Elements library in ASP.NET Core WebAplications - problem with publish (deps.json)

Hi,

I’ve problem with publishing my ASP.NET Core web app to linux - problem with reference to Elements project.
If I add Elements project to ASP.NET Core as built dll, its generated to WebApplication.deps.json.
If Iadd it as project reference it does not happen.

I paste you test case.
WebApplication3 with reference to built ClassLibrary4
TestASPNETCore\WebApplication3\bin\Release\netcoreapp3.1\publish\WebApplication3.deps.json
There is a link to ClassLibrary4.
WebApplication2 with reference to project ClassLibrary4
TestASPNETCore\WebApplication2\bin\Release\netcoreapp3.1\publish\WebApplication2.deps.json

It’s the only difference between WebApplication2 and WebApplication3.
WebApplication3 is starting on linux
WebApplication2 isn’t starting on linux, but the is a workaround - copy WebApplication3.deps.json as WebApplication2.deps.json and it works.

I’ve also added ClassLibrary2 - c# library, and modified Elements library project file to be similar but it doesn’t change anyting.

Please help - I don’t want to build ma classlib seperately

Strange. Since the host project is VC#, I’m assuming it’s an issue with how MSBuild passes the reference, for project vs. hardcoded .dll reference…

Does this work ok if the host project is Elements (Oxygene or C#, doesn’t matter), too?

Indeed it seems .deps file for App2 is missing ClassLIbrary4, while App3 has it:

Logged as bugs://E25389.

In ASP.NET Core Elements project I can onlu publish as Azure WebJob - I want to publish it to local folder - maybe it’s possible but don’t know how

It’s the difference - ClassLibrary4 in deps file. When running it with IIS it generates it ok, and this generated deps file for IIS pasted for linux service works fine

Okay. thats something to look art separately, later )maybe start a separate thread).

But is the library in the .deps.jsob ok? That should be verifiable regardless of publishing.

Yeah, we’ll need to fid out why its missing ion the Project Reference case. The prpoblem tis probably on the MSBuild side…

Hello Mateus,
could you please retest this issue with latest build? Recently we added some fixes that could affect and fix this issue as well. I cannot reproduce it here now. I tried to rebuild the attached project with VS2022, and I can see ClassLibrary4 in the WebApplication2.deps.json. This part looks like this:

“targets”: {
“.NETCoreApp,Version=v3.1”: {
“WebApplication2/1.0.0”: {
“dependencies”: {
“ClassLibrary2”: “1.0.0”,
“ClassLibrary4”: “1.0.0”,

Best regards.

I’ve installed VS 2022 and new version of Elements and it’s ok during build, but not during publish :frowning:
And it is the same in VS 2019