NAnt errors when generating assembly information after a project are updated to VS2010

I have a project that I recently upgraded to VS2010 - the project / solution files have been updated, but I'm still targeting .NET 3.5.

So far, my standard build of the NAnt script has not caused me any problems. However, it turned out that after updating the project and updating the NAnt configuration , in order to know about the new tool, now I get an error when information about the assembly of the assembly that does not complete the assembly. The corresponding build task is below:

<asminfo output="${dir.src}\${file.commonAssemblyInfo}" language="${project.codeLanguage}">
    <imports>
        <import namespace="System.Reflection" />
    </imports>
    <attributes>
        <attribute type="AssemblyVersionAttribute" value="${project.fullversion}" />
        <attribute type="AssemblyFileVersionAttribute" value="${project.fullversion}" />
        <attribute type="AssemblyInformationalVersionAttribute" value="${project.fullversion}" />
        <attribute type="AssemblyCopyrightAttribute" value="${assembly.copyright}" />
        <attribute type="AssemblyCompanyAttribute" value="${assembly.company}" />
        <attribute type="AssemblyConfigurationAttribute" value="${project.config}" />
        <attribute type="AssemblyTrademarkAttribute" value="${assembly.trademark}" />
        <attribute type="AssemblyProductAttribute" value="${assembly.product}" />
    </attributes>
</asminfo>

The error is highlighted for the first line of the task asminfo. It reads:

AssemblyInfo 'C:\Users\Grant\Projects\VisualStudio\Checklist\src\CommonAssemblyInfo.cs' . CAS, .NET Framework. CAS , NetFx40_LegacySecurityPolicy. . http://go.microsoft.com/fwlink/?LinkID=155570.

, - .NET 4. - ? - , asminfo, ?

+3
3

, . , , , NAnt ( 0,85).

NAnt, NAnt (0.91 -, .NET 4), , . , .

+1

NAnt NAnt 0.91 Alpha 1, .NET 4.0 (). , .

.

0

, *.csproj:

<ExcludeFromStyleCop>true</ExcludeFromStyleCop>

:

    <Compile Include="Properties\AssemblyInfo.cs">
      <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
    </Compile>
0

Source: https://habr.com/ru/post/1745494/


All Articles