VSTS Build for Asp.Net Core 解决方案失败,出现错误 MSB3554:无法写入输出文件
VSTS Build for Asp.Net Core solution fails with error MSB3554: Cannot write to the output file
我们有一个 Asp.Net 核心 1.1 项目,我们刚刚移动到 VSTS,当我们创建一个失败的构建定义时
enter code hereC:\Program Files\dotnet\sdk.0.0\Microsoft.Common.CurrentVersion.targets(2865,5): error MSB3554: Cannot write to the output file "C:\a\s\OurProject\obj\debug\netcoreapp1.1\OurProject.SomeResourceFile.fi-FI.resources". Positive number required. [C:\a\s\OurProject\OurProject.csproj]
C:\Program Files\dotnet\sdk.0.0\Microsoft.Common.CurrentVersion.targets(2865,5): error MSB3554: Parameter name: bufferSize [C:\a\s\OurProject\OurProject.csproj]
我在 Visual Studio 2017 年在我的机器上构建良好,在 vsts 构建设置中代理队列是 VS2017。
我遇到了同样的问题,因为资源文件是空的,导致.NET Core CLI 抛出错误。问题在这里:microsoft/msbuild#1661.
解决方法是手动编辑 *.resx 文件并向文件中添加一些数据。这是来自@sharwell PR in Roslyn:
的片段
<data name="EmptyResource" xml:space="preserve">
<value>Remove this value when another is added.</value>
<comment>https://github.com/Microsoft/msbuild/issues/1661</comment>
</data>
我们有一个 Asp.Net 核心 1.1 项目,我们刚刚移动到 VSTS,当我们创建一个失败的构建定义时
enter code hereC:\Program Files\dotnet\sdk.0.0\Microsoft.Common.CurrentVersion.targets(2865,5): error MSB3554: Cannot write to the output file "C:\a\s\OurProject\obj\debug\netcoreapp1.1\OurProject.SomeResourceFile.fi-FI.resources". Positive number required. [C:\a\s\OurProject\OurProject.csproj]
C:\Program Files\dotnet\sdk.0.0\Microsoft.Common.CurrentVersion.targets(2865,5): error MSB3554: Parameter name: bufferSize [C:\a\s\OurProject\OurProject.csproj]
我在 Visual Studio 2017 年在我的机器上构建良好,在 vsts 构建设置中代理队列是 VS2017。
我遇到了同样的问题,因为资源文件是空的,导致.NET Core CLI 抛出错误。问题在这里:microsoft/msbuild#1661.
解决方法是手动编辑 *.resx 文件并向文件中添加一些数据。这是来自@sharwell PR in Roslyn:
的片段<data name="EmptyResource" xml:space="preserve">
<value>Remove this value when another is added.</value>
<comment>https://github.com/Microsoft/msbuild/issues/1661</comment>
</data>