我们尝试建立使用.NET Framework 4.6.1 .NET标准库1.4项目使用命令提示符没有视觉工作室在Windows Server 2012 RC2自动化的目的。构建.NET标准库1.4使用.NET Framework 4.6.1没有视觉工作室
我已经安装在服务器上之后,
.Net Framework 4.6.1
.Net Framework 4.6.1 Targeting pack
Microsoft Build Tools 2015
这.NET标准库项目说项目A与其他两个标准的.NET图书馆工程项目B和项目C引用。
保持项目A启动项目
当我尝试编译项目A后DOTNET使用DOTNET建立 CMD,我收到以下错误恢复,
C:\Document\ProjectA>dotnet build
Project ProjectA (.NETStandard,Version=v1.4) will be compiled because
expected outputs are missing
Compiling ProjectA for .NETStandard,Version=v1.4
C:\Program Files\dotnet\dotnet.exe compile-csc
@C:\Document\ProjectA\obj\Debug\netstandard1.4\dotnet-compile.rsp returned
Exit Code 1
C:\Document\ProjectA\Sample.cs(1,17): error CS0234: The type or namespace name
'ProjectB' does not exist in the namespace 'XYZ' (are you missing an
assembly reference?)
C:\Document\ProjectA\Sample.cs(2,17): error CS0234: The type or namespace name
'ProjectC' does not exist in the namespace 'XYZ' (are you missing an
assembly reference?)
Compilation failed.
0 Warning(s)
2 Error(s)
请帮我从命令提示符编译解决方案。 示例代码:
using XYZ.ProjectB;
using XYZ.ProjectC;
using System;
namespace XYZ.ProjectA
{
public class Sample : ISample
{
public Void GetMessage()
{
var s=XYZ.ProjectB.GetList();
Console.Write("");
}
}
}
两个项目B和项目C也.Netstandard库
'的类型或命名空间名称“项目B”不会在命名空间“存在XYZ''这说明了一切!这些项目不具有相同的根命名空间! –
感谢您回应苏拉杰。它存在于同一个namespace..It编译和视觉正常执行studio..But当我带命令提示符的帮助编译它抛出错误。 – Priyadharsini
您需要在ABC中提供代码。cs' –