简体   繁体   中英

azure project msbuild is not copying app.config

When deploying an Azure worker role project from Visual studio, everything works fine.

When we build the package using command line msbuild, the apps.config is not copied to project.dll.config. How can we achieve that?

Note: the msbuild command builds a cspkg file (which is a zip). When we open the zip file, project.dll.config is not here.

Config: Visual studio 2013

azure sdk 2.3

Note 2: When you create an azure solution in visual studio, it creates 2 project:

  • One Azure project.

  • One worker role project.

This is the Azure project that is built, and the app.config belongs to the worker role project. Deploying through Visual studio makes the magic automatically, msbuild.exe does not ( or we don't know how to do it).

Is the App.config correctly specified in your .csproj file? You should have something similar to:

<Content Include="app.config">
  <SubType>Designer</SubType>
</Content>

Somewhere in your .csproj file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM