Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build project with latest release #661

Open
francotiveron opened this issue Dec 24, 2023 · 1 comment
Open

Unable to build project with latest release #661

francotiveron opened this issue Dec 24, 2023 · 1 comment

Comments

@francotiveron
Copy link

I create an F# project as per the readme.txt

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="Library.fs" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="ExcelDna.AddIn" Version="*-*" />
  </ItemGroup>

</Project>

The version downloaded is 1.8.0-alpha1

Build fails with

Error The target platform should specified as Windows in the project file. For example, net6.0-windows

Then I manually change the project

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net6.0-windows</TargetFramework>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="Library.fs" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="ExcelDna.AddIn" Version="*-*" />
  </ItemGroup>

</Project>

now I get 2 build errors

MSB4064 The "RollForward" parameter is not supported by the "CreateExcelAddIn" task loaded from assembly: ExcelDna.AddIn.Tasks, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f225e9659857edbe from the path: C:\Users\franco.tiveron.nuget\packages\exceldna.addin\1.7.0\tools\net452\ExcelDna.AddIn.Tasks.dll. Verify that the parameter exists on the task, the points to the correct assembly, and it is a settable public instance property. NinjaTrader.Excel C:\Users\franco.tiveron.nuget\packages\exceldna.addin\1.8.0-alpha1\build\ExcelDna.AddIn.targets 256

MSB4063 The "CreateExcelAddIn" task could not be initialized with its input parameters. NinjaTrader.Excel C:\Users\franco.tiveron.nuget\packages\exceldna.addin\1.8.0-alpha1\build\ExcelDna.AddIn.targets 231

Finally I downgrade to the latest stable

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net6.0-windows</TargetFramework>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="Library.fs" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="ExcelDna.AddIn" Version="1.7.0" />
  </ItemGroup>

</Project>

Now the build succeeds and I can debug (F5). however. no -packed.xll files are in the output folder

@govert
Copy link
Member

govert commented Dec 24, 2023

I get this error from time to time too, when changing the NuGet package version. What happens is that the build tasks that run are still taken from the old NuGet package - I presume because of some caching in Visual Studio or a build process.
You can see the version is wrong by looking at the directory of the ExcelDna.AddIn.Tasks.dll file - still showing 1.7.0 in the problem build.

Restarting Visual Studio normally fixes this - though sometimes I have to wait or kill the VBCSCompiler process.

If anyone has more information about this annoying bug I'd be happy to hear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants