我正在尝试使用bitbucket管道为我的.NET项目编写,使用WindowsForms编写C#7.0 . 但我总是得到一个错误 . 我用Unittests创建了一个简单的WinForm项目,只是为了尝试bitbucket管道,然后再将它用于我的actuall项目 . 我的项目结构如下所示:

justtestin
 |
 +-- .gitignore
 |
 +-- bitbucket-pipelines.yml
 |    
 +-- JustTestin
 |  |  
 |  +-- bin
 |  |
 |  +-- obj
 |  |
 |  +-- packages
 |  |
 |  +-- Properties
 |  |
 |  +-- TestResults
 |  |
 |  +-- JustTestin.csproj
 |  |
 |  +-- JustTestin.sln
 |  |
 |  +-- MyClass.cs
 |  |
 |  +-- MyFirstForm.cs
 |  |
 |  +-- MyFirstForm.Designer.cs
 |    
 +-- JustTestinTest
    |  
    +-- bin
    | 
    +-- obj
    |
    +-- Properties
    |
    +-- JustTestinTest.csproj
    |
    +-- MyClassTest.cs
    |
    +-- packages.config

我得到了几个错误,因为我尝试使用不同的设置配置bitbucket-pipelines.yml文件 . 但是他们中的非实际上对我来说效果很好 . 以下是一些示例错误:

- MSBUILD : error MSB1003: Specify a project or solution file. The current `working directory does not contain a project or solution file.`


- dotnet-test Error: 0 : System.InvalidOperationException: JustTestinTest/project.json does not exist.
   at Microsoft.DotNet.Tools.Test.TestCommand.GetProjectPath(String projectPath)
   at Microsoft.DotNet.Tools.Test.TestCommand.DoRun(String[] args)


 - Nothing to do. None of the projects specified contain packages to restore.
/usr/share/dotnet/sdk/2.1.105/Microsoft.Common.CurrentVersion.targets(1126,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/opt/atlassian/pipelines/agent/build/JustTestin/JustTestin.csproj]
/usr/share/dotnet/sdk/2.1.105/Microsoft.Common.CurrentVersion.targets(1126,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/opt/atlassian/pipelines/agent/build/JustTestinTest/JustTestinTest.csproj]
Build FAILED.
/usr/share/dotnet/sdk/2.1.105/Microsoft.Common.CurrentVersion.targets(1126,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/opt/atlassian/pipelines/agent/build/JustTestin/JustTestin.csproj]
/usr/share/dotnet/sdk/2.1.105/Microsoft.Common.CurrentVersion.targets(1126,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/opt/atlassian/pipelines/agent/build/JustTestinTest/JustTestinTest.csproj]
    0 Warning(s)
    2 Error(s)

等等 .

我使用Visual Studio 2017 Professional . 在我的本地机器上一切都很适合我 . 构建应用程序并运行单元测试不会报告任何错误 .

我现在的问题是:是否有适合我的bitbucket-pipelines.yml文件的设置?

谢谢...