-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
FrameworkReference issue with xll (.NET 6) #671
Comments
With Excel-DNA (at least at the moment) you can't target the ASP.NET version of the framework. I can't remember whether there is a serious problem, or it just worked out in the way we load the runtime. Anyway, we currently always load the Microsoft.WindowsDesktop.App framework, and your project's .runtimeconfig.json is ignored. The Microsoft.Extensions.Configuration libraries should, however, work fine with just the Desktop runtime. You might try to see how things look without the ASP.NET bits. I expect the right dependencies will then get copied to the output and packed in the add-in. If you need to host some http server from the add-in, then you can directly get an |
Hi Govert, Thank you. As you suggested I am heading towards a removal of the ASP.NET bits. Thanks also for the link on the HttpListener, it could help. |
We’ve now added an option to Excel-DNA to load the runtime using the add-in project’s .runtimeconfig.json file. I’ve made a small test project that shows how the ASP.NET Core SDK can now be loaded and used from an add-in. |
I want to build a xll from a .csproj in .NET 6.
This xll depends on Microsoft.Extensions.Configuration because I want to read the .xll.config file.
The xll also transitively depends on FrameworkReference "Microsoft.AspNetCore.App" because of other mandatory stuff.
Now when packing the xll, I observes that Microsoft.Extensions.Configuration.dll and other needed dlls are not packed.
They are not copied in the output folder by MSBuild, this works as intended as the dlls are part of Microsoft.AspNetCore.App. I understand this is the reason of their absence in the packed xll.
Now, while trying to load the xll with Excel, I have this error :
I can confirm that if I get rid of the FrameworkReference, all the dlls are packed as intended and the xll loads successfully. But this is not my use case.
I tried to play with the runtimeconfig.json file but I did not manage to make it work.
My runtimeconfig.json file looks like below:
Could you tell me what I missed please?
The text was updated successfully, but these errors were encountered: