简体   繁体   English

天蓝色项目msbuild不复制app.config

[英]azure project msbuild is not copying app.config

When deploying an Azure worker role project from Visual studio, everything works fine. 从Visual Studio部署Azure工作者角色项目时,一切正常。

When we build the package using command line msbuild, the apps.config is not copied to project.dll.config. 当我们使用msbuild命令行构建软件包时,apps.config不会复制到project.dll.config。 How can we achieve that? 我们如何实现这一目标?

Note: the msbuild command builds a cspkg file (which is a zip). 注意: msbuild命令将生成一个cspkg文件(是一个zip)。 When we open the zip file, project.dll.config is not here. 当我们打开zip文件时,project.dll.config不在这里。

Config: Visual studio 2013 配置:Visual Studio 2013

azure sdk 2.3 天蓝色SDK 2.3

Note 2: When you create an azure solution in visual studio, it creates 2 project: 注2:在Visual Studio中创建Azure解决方案时,它将创建2个项目:

  • One Azure project. 一个Azure项目。

  • One worker role project. 一个工人角色项目。

This is the Azure project that is built, and the app.config belongs to the worker role project. 这是已构建的Azure项目,而app.config属于辅助角色项目。 Deploying through Visual studio makes the magic automatically, msbuild.exe does not ( or we don't know how to do it). 通过Visual Studio部署会自动产生魔力,msbuild.exe不会(或者我们不知道如何做到)。

Is the App.config correctly specified in your .csproj file? .csproj文件中是否正确指定了App.config? You should have something similar to: 您应该有类似以下内容:

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

Somewhere in your .csproj file. .csproj文件中的某个位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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