问题标签 [xbuild]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1376 浏览

mono - 使用 Mono xbuild 编译 licx (lc.bat) 时如何修复“命令行太长”

我有一个相当大的解决方案。加载所有内容的父项目有很多引用以及不确保所有内容都被加载的内容。我还有一个用于我们使用的第三方 dll 的 licx 文件。这在视觉工作室中一切正常。

但是,当使用 xbuild (mono) 编译相同的解决方案时,lic.bat 命令会失败,因为“命令行太长”。

工具 C:\PROGRA~2\MONO-3~1.10\bin\lc.bat 执行以参数开始:--complist=my.licx --target=MyExe.exe --load=C:\PROGRA~2\MONO -3~1.10\lib\mono\4.5..\xbuild-frameworks.NETFramework\v4.0\RedistList........\4.0\System.dll --load=C:\PROGRA~2\MONO -3~1.10\lib\mono\4.5..\xbuild-frameworks.NETFramework\v4.0\RedistList........\4.0\System.Configuration.Install.dll --load=C:\PROGRA ~2\MONO-3~1.10\lib\mono\4.5..\xbuild-frameworks.NETFramework\v4.0\RedistList........\4.0\System.Data.dll --load=C: \PROGRA~2\MONO-3~1.10\lib\mono\4.5..\xbuild-frameworks.NETFramework\v4.0\RedistList........\4.0\System.Management.dll --load= C:\PROGRA~2\MONO-3~1.10\lib\mono\4.5..\xbuild-frameworks.NETFramework\v4.0\RedistList........\4.0\System.ServiceModel.dll -- load=C:\PROGRA~2\MONO-3~1.10\lib\mono\4.5..\xbuild-frameworks.NETFramework\v4.0\RedistList........\4.0\System.ServiceProcess.dll --load=......\Common\log4net.dll --load=C:\PROGRA~2\MONO-3~1.10\lib\mono\4.5..\xbuild-frameworks.NETFramework\ v4.0\RedistList........\4.0\System.Configuration.dll

.....................

……………………………………………………………………………………………………………………

…………………………………………………………………………………………………………

解决方案中有更多不同的 dll 行,路径很长

.....................

然后它会因该命令而失败

没有将我的 licx 文件移动到另一个项目以尝试减少此 licx 内容的引用,这是一种告诉 mono 不要包含某些项目或通过不同机制传递参数的方法。

后续问题 我想后续问题是为什么 lc.bat 必须引用每个 dll。它不只关心 licx 文件和其中引用的 dll 吗?

0 投票
1 回答
17584 浏览

c# - 如何使用 xbuild 构建发布二进制文件

当我使用 xbuild 时,它总是使用调试作为目标,我如何让它使用发布?

例如,我希望像

但这不起作用

0 投票
2 回答
1901 浏览

visual-studio-2010 - 初始化任务 DownloadNuGet 时出错:未注册任务 DownloadNuGet

我正在尝试在 Ubuntu 上使用 Mono 通过 C# 应用程序进行编译。我试图防止需要包含nuget.exe在我的 git 存储库中,并遵循了这个问题中接受的答案

如果我使用的是 Visual Studio 2010,这将有效。当我构建应用程序时,会按预期下载 nuget.exe。

但是,当我尝试使用 mono 和 xbuild 时,我收到以下错误。

我唯一更改的是设置DownloadNuGetExe= truein nuget.targets,因此该行如下所示:

我的问题: 如何设置它以使使用 mono/xbuild 的行为与使用 Visual Studio 时的行为相同(即自动下载 nuget)?

编辑 这是UsingTask出现在NuGet.targets文件中的行。

0 投票
1 回答
95 浏览

macos - Monobjc MSBuild 任务不起作用(其他库/排除程序集/其他程序集)

我正在尝试将我的 monobjc Cocoa 应用程序导出/编译为本机应用程序。我在 Xamarin 中制作了该项目,并确认所有属性都是正确的,并且我确实获得了成功的构建。但是,我正在尝试指定一些程序集以出于许可目的排除并包含其他库。我看到可以通过将它们添加到<AddtionalLibraries>csproj 中的标记或通过 Xamarin 来指定要包含/排除的其他库/程序集的选项。但是,指定库似乎在BundleNative目标方面没有任何作用。我试过指定绝对路径和输出目录的相对路径。我以以下形式指定附加库: libtest_library.dylib和排除的程序集,如Monobjc.dll. 添加/排除程序集的选项有问题(因此我需要提交错误)还是我遗漏了什么?

(在 csproj 文件中,它看起来像<ExcludedAssemblies>Monobjc.dll</ExcludedAssemblies>在相应的 Project->PropertyGroup 下)

0 投票
1 回答
738 浏览

c# - 命名参数“allowPrereleaseVersions”不能用于指定了位置参数的参数

尝试在单声道上构建 NuGet 并获得:

跑步:

问题:它是什么?是错误还是我做错了什么?

一些分析...

代码 :

错误来自:https ://github.com/mono/mono/blob/master/mcs/mcs/ecore.cs#L5324

完整日志:

XBuild Engine 版本 3.2.0.0 Mono,版本 3.2.0.0 版权所有 (C) Marek Sieradzki 2005-2008,Novell 2008-2011。

构建开始于 07/29/2013 09:24:01。 _ __ _ __ _ __ _ __ _ __ _ __ _ __ _ __ _ ___项目“/var/tmp/portage/dev-dotnet/nuget-2013.07/work/Build/Build.proj”(GoMono 目标):目标 RestorePackages:项目“/var/tmp/portage/dev-dotnet/nuget -2013.07/work/src/CommandLine/CommandLine.csproj" (Build target(s)): Target PrepareForBuild: Configuration: Mono Release Platform: AnyCPU Created directory "bin/Release/" Created directory "obj/Mono Release/" Target ResolveProjectReferences :项目“/var/tmp/portage/dev-dotnet/nuget-2013.07/work/src/Core/Core.csproj”(默认目标):目标 PrepareForBuild:配置:Mono 发布平台:AnyCPU 创建目录“bin/Release/” 创建目录“obj/Mono Release/” 目标 CopyFilesMarkedCopyLocal:从 '/var/tmp/portage/dev-dotnet/nuget-2013.07/work/lib/ 复制文件Microsoft.Web.XmlTransform.dll' 到 '/var/tmp/portage/dev-dotnet/nuget-2013.07/work/src/Core/bin/Release/Microsoft.Web.XmlTransform.dll' 目标 CopyNonResxEmbeddedResources:从 ' 复制文件/var/tmp/portage/dev-dotnet/nuget-2013。07/work/src/Core/Authoring/nuspec.xsd' 到 '/var/tmp/portage/dev-dotnet/nuget-2013.07/work/src/Core/obj/Mono Release/NuGet.Authoring.nuspec.xsd'目标 GenerateResources:工具 /usr/bin/resgen2 使用参数开始执行:/useSourcePath /compile "../../Common/CommonResources.resx,obj/Mono Release/NuGet.CommonResources.resources" Tool /usr/bin/resgen2以参数开始执行:/useSourcePath /compile "Resources/AnalysisResources.resx,obj/Mono Release/NuGet.Resources.AnalysisResources.resources" 工具 /usr/bin/resgen2 以参数开始执行:/useSourcePath /compile "Resources/NuGetResources.resx,obj/Mono Release/NuGet.Resources.NuGetResources.resources" 目标 GenerateSatelliteAssemblies:没有为目标 GenerateSatelliteAssemblies 指定输入文件,正在跳过。目标 CoreCompile:工具 /usr/bin/dmcs 使用参数开始执行:/noconfig /debug:pdbonly /optimize+ /out:"obj/Mono Release/NuGet.Core.dll" /resource:"obj/Mono Release/NuGet.CommonResources.resources" /resource:"obj/Mono Release/NuGet.Resources.AnalysisResources .resources" /resource:"obj/Mono Release/NuGet.Resources.NuGetResources.resources" /resource:"obj/Mono Release/NuGet.Authoring.nuspec.xsd" 。./../Common/CommonResources.cs ../../Common/CommonAssemblyInfo.cs ../../Common/GlobalSuppressions.cs Analysis/IPackageRule.cs Analysis/PackageIssue.cs Analysis/DefaultPackageRuleSet.cs Analysis/PackageIssueLevel .cs Analysis/Rules/InitScriptNotUnderToolsRule.cs Analysis/Rules/InvalidFrameworkFolderRule.cs Analysis/Rules/MisplacedAssemblyRule.cs Analysis/Rules/MisplacedScriptFileRule.cs Analysis/Rules/MisplacedTransformFileRule.cs Analysis/Rules/MissingSummaryRule.cs Analysis/Rules/WinRTNameIsObsoleteRule。 cs Authoring/AssemblyMetadata.cs Authoring/AssemblyMetadataExtractor.cs Authoring/EmptyFrameworkFolderFile.cs Authoring/IPackageBuilder.cs Authoring/IPropertyProvider.cs Authoring/ManifestDependencySet.cs Authoring/ManifestFrameworkAssembly.cs Authoring/ManifestDependency.cs Authoring/ManifestFile。cs Authoring/ManifestMetadata.cs Authoring/ManifestReader.cs Authoring/ManifestReference.cs Authoring/ManifestReferenceSet.cs Authoring/ManifestSchemaUtility.cs Authoring/ManifestVersionAttribute.cs Authoring/ManifestVersionUtility.cs Authoring/NullPropertyProvider.cs Authoring/PackageDependencySet.cs Authoring/PackageReferenceSet。 cs Authoring/PhysicalPackageAssemblyReference.cs Configuration/ConfigurationDefaults.cs Configuration/SettingsCredentialProvider.cs Configuration/ISettings.cs Configuration/NullSettings.cs Configuration/Settings.cs Configuration/SettingValue.cs EnvironmentVariableWrapper.cs Extensions/CredentialProviderExtensions.cs Extensions/EnumerableExtensions.cs Extensions /ObjectExtensions.cs 扩展/PackageOperationExtensions.cs 扩展/QueryableExtensions.cs 扩展/SettingsExtensions。cs Extensions/TaskExtensions.cs Extensions/VersionExtensions.cs FileModifiers/FileTransformExtensions.cs Http/CredentialStore.cs Http/CredentialType.cs Http/ICredentialCache.cs Http/IHttpWebResponse.cs Http/IProxyCache.cs Http/MultipartWebRequest.cs Http/NullCredentialProvider。 cs Http/ProxyCache.cs Http/RepositoryOperationNames.cs Http/RequestHelper.cs Http/STSAuthHelper.cs Http/WIFTypeProvider.cs IEnvironmentVariableReader.cs IMachineWideSettings.cs Logging/FileConflictResolution.cs Logging/IFileConflictResolver.cs NETPortable/NetPortableProfile.cs NETPortable/NetPortableProfileCollection .cs NETPortable/NetPortableProfileTable.cs PackageRestoreConsent.cs Packages/LocalPackage.cs Packages/OptimizedZipPackage.cs Packages/UnzippedPackage.cs PackageWalker/NuGetVersionNotSatisfiedException。cs ProjectSystem/ProjectImportLocation.cs Repositories/ILatestPackageLookup.cs ProjectSystem/IBatchProcessor.cs Repositories/ICloneableRepository.cs Repositories/ICultureAwareRepository.cs Repositories/IPackageCacheRepository.cs Repositories/IPackageReferenceRepository.cs Repositories/IOperationAwareRepository.cs Repositories/IServiceBasedRepository.cs Repositories cs Repositories/UnzippedPackageRepository.cs Resources/AnalysisResources.Designer.cs SemanticVersion.cs SemanticVersionTypeConverter.cs Server/PackageServer.cs GlobalSuppressions.cs IPackageManager.cs IProjectManager.cs PackageSource/IPackageSourceProvider.cs PackageSource/PackageSourceProvider.cs PackageSource/PackageSourceProviderExtensions.cs Packages/ FrameworkAssemblyReference.cs 包/IFrameworkTargetable.cs 包/IPackageMetadata。cs Packages/IServerPackageMetadata.cs PackageWalker/ConflictResult.cs Repositories/IDependencyResolver.cs PackageWalker/PackageSorter.cs PackageWalker/IPackageOperationResolver.cs PackageWalker/IDependentsResolver.cs PackageWalker/PackageAction.cs PackageWalker/PackageOperation.cs PackageWalker/PackageTargets.cs PackageWalker/PackageWalkInfo。 cs ProjectSystem/NullFileSystem.cs ProjectSystem/PhysicalFileSystem.cs ConstraintProviders/AggregateConstraintProvider.cs Repositories/AggregateQuery.cs Repositories/AggregateRepository.cs ConstraintProviders/DefaultConstraintProvider.cs ConstraintProviders/IPackageConstraintProvider.cs Repositories/IPackageLookup.cs Repositories/MachineCache.cs Repositories/NullConstraintProvider。 cs 存储库/PackageReference.cs 存储库/PackageReferenceFile.cs 实用程序/CredentialResult。cs Utility/CredentialState.cs Utility/CustomAttributeProviderExtensions.cs Utility/DisposableAction.cs Utility/EncryptionUtility.cs Utility/ExceptionUtility.cs Http/HttpUtility.cs Http/ICredentialProvider.cs Http/IHttpClientEvents.cs 存储库/LazyQueue.cs 存储库/ProgressEventArgs。 cs Repositories/SmartDataServiceQuery.cs Repositories/BufferedEnumerable.cs Repositories/DataServiceContextWrapper.cs Repositories/DataServiceQueryWrapper.cs Repositories/ExpressionRewriter.cs Repositories/IDataServiceContext.cs Repositories/IDataServiceQuery.cs Repositories/IPackageRepositoryFactory.cs Repositories/ISharedPackageRepository.cs Repositories/OrderingComparer。 cs Extensions/AppDomainExtensions.cs Extensions/AssemblyNameExtensions.cs Repositories/SharedPackageRepository.cs Runtime/AssemblyBinding。cs Runtime/BindingRedirectManager.cs Runtime/BindingRedirectResolver.cs Runtime/IAssembly.cs Runtime/RemoteAssembly.cs Extensions/CollectionExtensions.cs FileModifiers/Preprocessor.cs FileModifiers/XmlTransfomer.cs Http/IHttpClient.cs Utility/FrameworkNameEqualityComparer.cs Utility/IProgressProvider。 cs Utility/IVersionSpec.cs Utility/MemoryCache.cs Utility/PackageComparer.cs Utility/PackageRepositoryHelper.cs Utility/PackageIdValidator.cs Utility/PathValidator.cs Http/RedirectedHttpClient.cs Utility/ProjectManagerExtensions.cs Utility/ReadOnlyHashSet.cs Utility/VersionSpec。 cs Utility/WebRequestEventArgs.cs FileModifiers/XdtTransformer.cs Logging/NullLogger.cs Logging/ILogger.cs PackageOperationEventArgs.cs Logging/MessageLevel.cs PackageManager.cs Authoring/PhysicalPackageFile.cs Authoring/PackageBuilder。cs Authoring/PathResolver.cs Authoring/Manifest.cs PackageSource/PackageSource.cs Packages/DataServicePackage.cs Packages/DefaultPackagePathResolver.cs Packages/IPackage.cs Packages/IPackagePathResolver.cs ProjectManager.cs FileModifiers/IPackageFileTransformer.cs Repositories/DataServicePackageRepository.cs Utility /HashCodeCombiner.cs Http/HttpClient.cs Utility/PackageDownloader.cs Utility/IHashProvider.cs Utility/PackageEqualityComparer.cs PackageWalker/PackageMarker.cs Packages/ZipPackage.cs Packages/IPackageAssemblyReference.cs Packages/ZipPackageAssemblyReference.cs PackageWalker/PackageWalker.cs PackageWalker /InstallWalker.cs PackageWalker/UpdateWalker.cs PackageWalker/DependentsWalker.cs PackageWalker/UninstallWalker.cs ProjectSystem/IFileSystem.cs Repositories/PackageReferenceRepository。cs Extensions/PackageExtensions.cs Repositories/PackageRepositoryExtensions.cs Extensions/FileSystemExtensions.cs Repositories/PackageRepositoryFactory.cs Resources/NuGetResources.Designer.cs Extensions/ProjectSystemExtensions.cs Utility/PathUtility.cs Utility/QueryableUtility.cs Utility/CryptoHashProvider.cs Extensions/ StreamExtensions.cs Extensions/StringExtensions.cs Utility/PackageHelper.cs Utility/XmlUtility.cs ProjectSystem/IProjectSystem.cs Repositories/PackageRepositoryBase.cs Repositories/IPackageRepository.cs Packages/Constants.cs Packages/IPackageFile.cs Packages/PackageDependency.cs Repositories/ LocalPackageRepository.cs Properties/AssemblyInfo.cs Utility/UriUtility.cs Utility/VersionUtility.cs Extensions/XElementExtensions.cs Packages/ZipPackageFile.cs /target:library /warnaserror+ /define:CODE_ANALYSIS /platform:AnyCPU /reference:../../lib/Microsoft.Web.XmlTransform.dll /reference:/usr/lib/mono/4.0/System.dll /reference:/usr/lib/mono/4.0/ System.ComponentModel.DataAnnotations.dll /reference:/usr/lib/mono/4.0/System.Data.Services.Client.dll /reference:/usr/lib/mono/4.0/System.Runtime.Serialization.dll /reference: /usr/lib/mono/4.0/System.Security.dll /reference:/usr/lib/mono/4.0/System.ServiceModel.dll /reference:/usr/lib/mono/4.0/System.Xml.Linq.dll /reference:/usr/lib/mono/4.0/Microsoft.CSharp.dll /reference:/usr/lib/mono/4.0/System.Xml.dll /reference:/usr/lib/mono/4.0/WindowsBase.dll /参考:/usr/lib/mono/4.0/System.Core.dll /warn:4 PackageManager.cs(97,75):错误 CS1744:命名参数dll /reference:/usr/lib/mono/4.0/System.ComponentModel.DataAnnotations.dll /reference:/usr/lib/mono/4.0/System.Data.Services.Client.dll /reference:/usr/lib/mono /4.0/System.Runtime.Serialization.dll /reference:/usr/lib/mono/4.0/System.Security.dll /reference:/usr/lib/mono/4.0/System.ServiceModel.dll /reference:/usr/ lib/mono/4.0/System.Xml.Linq.dll /reference:/usr/lib/mono/4.0/Microsoft.CSharp.dll /reference:/usr/lib/mono/4.0/System.Xml.dll /reference: /usr/lib/mono/4.0/WindowsBase.dll /reference:/usr/lib/mono/4.0/System.Core.dll /warn:4 PackageManager.cs(97,75):错误 CS1744:命名参数dll /reference:/usr/lib/mono/4.0/System.ComponentModel.DataAnnotations.dll /reference:/usr/lib/mono/4.0/System.Data.Services.Client.dll /reference:/usr/lib/mono /4.0/System.Runtime.Serialization.dll /reference:/usr/lib/mono/4.0/System.Security.dll /reference:/usr/lib/mono/4.0/System.ServiceModel.dll /reference:/usr/ lib/mono/4.0/System.Xml.Linq.dll /reference:/usr/lib/mono/4.0/Microsoft.CSharp.dll /reference:/usr/lib/mono/4.0/System.Xml.dll /reference: /usr/lib/mono/4.0/WindowsBase.dll /reference:/usr/lib/mono/4.0/System.Core.dll /warn:4 PackageManager.cs(97,75):错误 CS1744:命名参数Security.dll /reference:/usr/lib/mono/4.0/System.ServiceModel.dll /reference:/usr/lib/mono/4.0/System.Xml.Linq.dll /reference:/usr/lib/mono/4.0 /Microsoft.CSharp.dll /reference:/usr/lib/mono/4.0/System.Xml.dll /reference:/usr/lib/mono/4.0/WindowsBase.dll /reference:/usr/lib/mono/4.0/ System.Core.dll /warn:4 PackageManager.cs(97,75):错误 CS1744:命名参数Security.dll /reference:/usr/lib/mono/4.0/System.ServiceModel.dll /reference:/usr/lib/mono/4.0/System.Xml.Linq.dll /reference:/usr/lib/mono/4.0 /Microsoft.CSharp.dll /reference:/usr/lib/mono/4.0/System.Xml.dll /reference:/usr/lib/mono/4.0/WindowsBase.dll /reference:/usr/lib/mono/4.0/ System.Core.dll /warn:4 PackageManager.cs(97,75):错误 CS1744:命名参数 allowPrereleaseVersions' cannot be used for a parameter which has positional argument specified PackageManager.cs(100,29): (Location of the symbol related to previous error) PackageManager.cs(97,48): error CS1744: Named argument ignoreDependencies' 不能用于指定了位置参数的参数 PackageManager.cs(100,29):(与先前错误相关的符号位置)任务“Csc”执行 -- FAILED 在项目中完成构建目标“CoreCompile”“/ var/tmp/portage/dev-dotnet/nuget-2013.07/work/src/Core/Core.csproj".-- FAILED Done building project "/var/tmp/portage/dev-dotnet/nuget-2013.07/work/src /Core/Core.csproj".-- FAILED Task "MSBuild" 执行 -- FAILED Done build target "ResolveProjectReferences" in project "/var/tmp/portage/dev-dotnet/nuget-2013.07/work/src/CommandLine/CommandLine.csproj".-- FAILED Done building project "/var/tmp/portage/dev-dotnet/nuget-2013.07/work/ src/CommandLine/CommandLine.csproj".-- 失败的任务 "MsBuild" 执行 -- 在项目 "/var/tmp/portage/dev-dotnet/nuget-2013.07/work/Build/Build. proj".-- 失败完成构建项目 "/var/tmp/portage/dev-dotnet/nuget-2013.07/work/Build/Build.proj".-- 失败执行 -- FAILED Done build target "RestorePackages" in project "/var/tmp/portage/dev-dotnet/nuget-2013.07/work/Build/Build.proj".-- FAILED Done building project "/var/tmp/portage /dev-dotnet/nuget-2013.07/work/Build/Build.proj".--失败执行 -- FAILED Done build target "RestorePackages" in project "/var/tmp/portage/dev-dotnet/nuget-2013.07/work/Build/Build.proj".-- FAILED Done building project "/var/tmp/portage /dev-dotnet/nuget-2013.07/work/Build/Build.proj".--失败

构建失败。错误:

/var/tmp/portage/dev-dotnet/nuget-2013.07/work/Build/Build.proj (GoMono) -> (RestorePackages 目标) -> /var/tmp/portage/dev-dotnet/nuget-2013.07/work/ src/CommandLine/CommandLine.csproj(构建)-> /usr/lib/mono/4.0/Microsoft.Common.targets(ResolveProjectReferences 目标)-> /var/tmp/portage/dev-dotnet/nuget-2013.07/work/src /Core/Core.csproj(默认目标)-> /usr/lib/mono/4.0/Microsoft.CSharp.targets(CoreCompile 目标)->

指定位置参数 PackageManager.cs(97,48):错误 CS1744:命名参数“ignoreDependencies”不能用于指定位置参数的参数

0 投票
1 回答
1011 浏览

visual-studio-2012 - 使用 Mono 编译器时从 VisualStudio 2012 .sln 中排除 .csproj

我想用 Mono 构建我的 VisualStudio 2012 解决方案 (.sln),但它无法编译依赖于 VisualStudio 特定程序集的项目。例如

在这种情况下,HypervResourceControllerTest.cs(18,17) 是对 Visual Studio 测试工具的引用:

由于我不需要测试环境来编译,我可以告诉 Mono 编译器绕过 .sln 中的特定项目吗?

0 投票
0 回答
381 浏览

xbuild - 我可以在命令行上通过 xbuild 将参数传递给 msc 吗?

xbuild 有没有办法通过命令行或在构建脚本中将其他参数传递给编译器?具体来说,我想传入--mcs-debug 1以获取内部编译器错误的堆栈跟踪。

我可以通过更新来解决它%MONO%\bin\gmcs,但我希望有更好的方法。

0 投票
1 回答
206 浏览

mono - gmcs 或 xbuild 是否预定义了任何属性?

我正在将一些 .NET 代码移植到单声道,其中涉及 #if 块,例如:

我可以在 csproj 文件中定义这些东西并设置一个单声道构建目标。但是,我想知道 xbuild 或 gmcs 是否预定义了任何东西,所以我知道我是否在单声道上编译。

0 投票
1 回答
7442 浏览

c# - 如何编译使用不安全代码的解决方案?

如何使用代码编译Visual Studio 2010解决方案?xbuildunsafe

目前我收到此错误:

实现/MaximumImageColorClassifier.cs(35,13):错误 CS0227:不安全代码需要指定“不安全”命令行选项

但是运行:

xbuild -unsafe [解决方案文件]

或者:

xbuild /unsafe [解决方案文件]

给出一个错误:

MSBUILD:错误 MSBUILD0004:指定的项目文件过多

xbuildhelp 表明这是正确的语法:

xbuild /? ... xbuild [选项] [项目文件]

但是没有unsafe选项,也没有“通用”选项来提供一些编译标志。

我看到了这个问题:我可以在命令行上通过 xbuild 向 msc 传递参数吗?但它没有明确的答案,也许有针对不安全代码的特定解决方法?

另外,在我的情况下xbuild是使用dmcs编译器。

0 投票
1 回答
1451 浏览

c# - xbuild 错误构建 *.sln 文件

我需要在 ubuntu 上编译 c# .sln 文件。

这个文件是 ITU Gaze Tracker。他们基于window .net 框架开发了它。

但我需要在 ubuntu 上运行它。所以我尝试使用 xbuild 编译它。

当我输入“xbuild GazeTracker.sln”时,出现如下错误。

我该如何解决这个问题并编译这个 .sln 文件。

还是不可能?

请帮帮我