I'm using the command-line to call msbuild to generate a published version of a website using this command:
msbuild.exe /t:ResolveReferences;Compile;_CopyWebApplication /p:OutDir=dir/bin/
/p:WebProjectOutputDir=dir/ /p:Debug=false /p:Configuration=Release
Website.csproj
This works fine other than the embedded resources not being present in the Website.dll
. If I do the publish via Visual Studio it includes the embedded resources. Is there a flag I'm missing?
It appears
/t:PrepareResources
calls all the targets youve added to your msbuild call, try that
heres the top few levels of what gets called
PrepareResources
PrepareResourceNames
AssignTargetPaths
SplitResourcesByCulture
CreateManifestResourceNames
CreateCustomManifestResourceNames
ResGen
ResolveAssemblyReferences
SplitResourcesByCulture
BeforeResGen
CoreResGen
AfterResGen
CompileLicxFiles
An extra target is required like so:
msbuild.exe /t:PrepareResources;ResolveReferences;Compile;_CopyWebApplication
/p:OutDir=dir/bin/ /p:WebProjectOutputDir=dir/ /p:Debug=false
/p:Configuration=Release Website.csproj
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With