Monodevelop中的Visual Studio C#项目 - GenerateSatelliteAssemblies和GenerateTargetFrameworkMonikerAttribute的错误

时间:2016-05-26 21:11:02

标签: c# linux mono monodevelop

我正在尝试设置一个与Windows 10 / Visual Studio 2015和Ubuntu 16.04 / MonoDevelop兼容的C#项目。
在MonoDevelop项目选项中,我将目标框架设置为Mono / .NET 4.5,配置设置为Debug|x86

.csproj文件现在看起来像这样:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProjectGuid>{myprojectsguid}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <RootNamespace>myproject</RootNamespace>
    <AssemblyName>myproject</AssemblyName>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug</OutputPath>
    <DefineConstants>DEBUG;</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <Externalconsole>true</Externalconsole>
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <DebugType>full</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <Externalconsole>true</Externalconsole>
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

当我建立时,我收到此消息:

Erzeuge Projektmappe: myproject (Debug|x86)

myproject (Debug|x86) wird erzeugt

Build started 26.05.2016 22:05:49.
__________________________________________________
Project "pathto/myproject.csproj" (Build target(s)):

    Target PrepareForBuild:
        Configuration: Debug Platform: x86

    Target GenerateSatelliteAssemblies:
    No input files were specified for target GenerateSatelliteAssemblies, skipping.

    Target GenerateTargetFrameworkMonikerAttribute:
    Skipping target "GenerateTargetFrameworkMonikerAttribute" because its outputs are up-to-date.
Done building project "pathto/myproject.csproj".-- FAILED

Build FAILED.
     0 Warning(s)
     0 Error(s)

Time Elapsed 00:00:00.0785520

--------------------- Fertig ---------------------

Erzeugung erfolgreich.

这个消息似乎自相矛盾。英语部分说&#34;构建失败&#34;,而本地化/德语部分说&#34;构建成功&#34;。但是没有创建可执行文件 我没有找到关于GenerateSatelliteAssembliesGenerateTargetFrameworkMonikerAttribute的任何适用信息 我是否需要进一步更改项目设置?我是否需要提供一些丢失的文件?

更新
显然,有些包丢失了。所以我跑了sudo apt-get install mono-complete。现在该项目成功建立 但是,有关GenerateSatelliteAssembliesGenerateTargetFrameworkMonikerAttribute的通知仍然存在。看起来他们没有打破构建。我仍然想知道他们的意思。

1 个答案:

答案 0 :(得分:1)

(我刚刚发布了提问者在问题中写的答案。)

对于提问者来说,事实证明有些包裹丢失了。提问者运行sudo apt-get install mono-complete,然后项目将成功构建。