简体   繁体   English

Visual Studio自动生成中的命名空间问题

[英]Namespace Issues in Visual Studio Automated Builds

Having a bit of an issue with automated builds in Visual Studio Team Services (previously VSO, TFS Online). 在Visual Studio Team Services(以前是VSO,TFS Online)中对自动生成有一些问题。

I have a class that is referencing a namespace that is this format: 我有一个引用这种格式的名称空间的类:

Project.Name.Name.Folder Project.Name.Name.Folder

The issue is there is class named: 问题是有一个名为:

Project.Name. 项目名。

There is no issue in Visual Studio when building or even packaging the project for Azure and it deploys manually fine, but when I run automated builds it comes back with and error that basically states that Name does not exist in namespace Project.Name, so it's obviously looking in the wrong project when it runs the automated build. 在Visual Studio中,即使为Azure构建或打包项目也没有问题,并且可以手动进行很好的部署,但是当我运行自动构建时,它会返回并提示错误,该错误基本上指出Name在名称空间Project.Name中不存在,因此当它运行自动构建时,显然是在寻找错误的项目。

Is there some syntax I can use to basically notate what is specifically the class name and then the folder path inside the class? 我是否可以使用一些语法来基本表示什么是类名,然后是类内的文件夹路径?

ex: [Project.Name.Name].Folder 例如:[Project.Name.Name] .Folder

Any help is appreciated. 任何帮助表示赞赏。

Turns out VS was just confused :/ If I removed the reference, re-added it, and then removed the using statement and re-added it, the issue was resolved. 原来VS只是令人困惑://如果我删除了引用,将其重新添加,然后删除了using语句并重新添加,则问题已解决。 To be fair, the solution built, ran, and even manually deployed to Azure just fine. 公平地说,该解决方案可以很好地构建,运行甚至手动部署到Azure。 It was Continuous Integration that was being problematic with it. 问题是持续集成。

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

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