我正在运行以下 msbuild 命令
msbuild /verbosity:normal /property:configuration="Release" /property:VisualStudioVersion="12.0" /m /property:RunOctoPack="true" /property:OctoPackEnforceAddingFiles="true" /target:"Clean" ../MYSLN。登录
成功构建。
我只是尝试在 OSX 上使用 xbuild 运行相同的命令,所以:
xbuild /verbosity:normal /property:configuration="Release" /property:VisualStudioVersion="12.0" /m /property:RunOctoPack="true" /property:OctoPackEnforceAddingFiles="true" /target:"Clean" ../MYSLN.登录
哪个报道
MSBUILD:错误 MSBUILD0004:指定的项目文件太多
我有 XBuild Engine 12.0 版和 Mono 4.0.2.0 版
我列出参数的方式是否有一些细微的错误
- - 编辑 - -
在这里抛出:https : //github.com/mono/mono/blob/master/mcs/tools/xbuild/Parameters.cs#L140这表明 xbuild 没有拿起解决方案文件(我认为)
注意,我已经尝试将解决方案文件作为第一个和最后一个参数无济于事
- - 编辑 - -
我补充说,解决方案文件有一个大写名称,以防万一。
- - 编辑 - -
啊,我一直在围绕他们的参数解析代码编写测试,但它无法识别 /m
有一个问题,编译一些使用的代码HttpContextBase
抛出编译错误:
UserService.cs(13,26): error CS0433: The imported type `System.Web.HttpContextBase' is defined multiple times
Run Code Online (Sandbox Code Playgroud)
违规行是:
private readonly HttpContextBase httpContext;
Run Code Online (Sandbox Code Playgroud)
如果我取出该行代码或对其进行注释,则错误消失并且汇编编译.
在另一个项目(此项目的测试项目)中,尝试声明HttpContextBase
传递给此对象的构造函数时会发生相同的错误.所以它似乎是一个跨项目的问题.
这是项目文件问题吗?(System.Web
在那里找不到多个引用).它是在我对AfterBuild
步骤进行一些更改之前编译的,所以我担心我在csproj文件中弄乱了一些东西.
这是使用Mono 2.10.1构建的,使用monodevelop trunk构建集来使用xbuild进行编译.
使用默认的Monodevelop构建行为进行编译不会产生此错误.
我使用Nancy Asp.Net Web应用程序模板,使用Visual Studio 2013创建了非常简单的项目.
在我的开发机器中,它是由Visual Studio 2013成功构建的.
但是当我尝试使用xbuild在Linux Mono环境中构建相同的源时,它就失败了.
这是输出:
root@jannes:/home/hitly/hitly/src/Hitly.Service# xbuild
XBuild Engine Version 12.0
Mono, Version 3.2.8.0
Copyright (C) 2005-2013 Various Mono authors
Build started 3/31/2014 2:11:49 PM.
__________________________________________________
Project "/home/hitly/hitly/src/Hitly.Service/Hitly.Service.csproj" (default target(s)):
Target RestorePackages:
Executing: mono --runtime=v4.0.30319 ../.nuget/NuGet.exe install "" -source "" -RequireConsent -solutionDir "../"
The specified path is not of a legal form (empty). /home/hitly/hitly/src/.nuget/NuGet.targets: error : Command 'mono --runtime=v4.0.30319 ../.nuget/NuGet.exe install "" -source "" -RequireConsent -solutionDir "../"' exited with code: 1.
Task "Exec" execution …
Run Code Online (Sandbox Code Playgroud) 我们有一个C#项目,可以在Windows和TeamCity中的Visual Studio中很好地构建.
我尝试使用Mono的Linux在Linux上构建它xbuild
:
MONO_IOMAP=case xbuild BuildAll.sln
Run Code Online (Sandbox Code Playgroud)
构建失败,有2个警告和7个错误,所有这些都是关于XmlDiffPatch
.
警告:
/usr/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'XmlDiffPatch, Version=1.0.8.28, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' not resolved
Run Code Online (Sandbox Code Playgroud)
错误:
***REDACTED***: error CS0234: The type or namespace name `XmlDiffPatch' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Run Code Online (Sandbox Code Playgroud)
有几个.cs
文件
using Microsoft.XmlDiffPatch;
Run Code Online (Sandbox Code Playgroud)
我在一个.csproj
文件中有这个:
<ItemGroup>
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Security" />
<Reference Include="System.Xml" />
<Reference Include="XmlDiffPatch, Version=1.0.8.28, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> …
Run Code Online (Sandbox Code Playgroud) 我正在尝试设置我们的 jenkins,并希望来自它的构建使用与自动开发人员不同的身份进行签名。我当前的命令如下所示:
/Library/Frameworks/Mono.framework/Commands/xbuild Project.sln
/p:Target=Project.iOS /p:Platform=iPhone /p:Configuration=Release
/p:BuildIpa=true /target:SigningKey="iPhone Distribution"
/target:Build
Run Code Online (Sandbox Code Playgroud)
这不起作用。它仍在尝试使用开发人员证书进行构建。我似乎找不到任何关于如何做到这一点的文档,任何帮助都会很棒。
xbuild ×5
mono ×3
msbuild ×2
nuget ×2
.net ×1
c# ×1
linux ×1
monodevelop ×1
xamarin ×1
xamarin.ios ×1