c# - Embedded resource in nuget package -


i'm building c# library packaged nuget. contains error code translations in .resx file in resources directory called errors.en.resx. file has "build action" set "embedded resource" (which i've confirmed in .csproj file), when project built resource ends in separate dll in "en" folder.

this works fine is, when packaging nuget "en" folder missed, means attempts use resourcemanager fetch messages fail.

ideally i'd resource embedded in main .dll, failing i'll settle adding resource dll nuget package. various changes settings , nuget spec changes have not succeeded far.

in end simplest solution explicitly add resource file in nuget spec:

  <files>     <file src="bin\$configuration$\en\*.dll" target="lib\net45\en" />   </files> 

reference: specifying files include in package


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -