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

Microsoft.CodeAnalysis v3.4.0 package appears to be empty is this correct? #42445

Closed
TehWardy opened this issue Mar 15, 2020 · 7 comments
Closed

Comments

@TehWardy
Copy link

TehWardy commented Mar 15, 2020

Version Used:
3.4.0 : https://www.nuget.org/packages/Microsoft.CodeAnalysis

Steps to Reproduce:

  1. Updated existing version to this version through reference
  2. Nuget pulls package
  3. look in package folder

Expected Behavior:
Dll file for use in project

Actual Behavior:
No dll file in package.

When app runs, runtime error of ...

Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

... is provided by framework.

I am also referencing packages ...

  • Microsoft.CodeAnalysis.CSharp.Scripting
  • Microsoft.CSharp

... which in turn appear to be referencing their own stack of dependencies, those packages appear to have libs in them.

Appears to be the cause of issue dotnet/core#4390

image

image

@jmarolf
Copy link
Contributor

jmarolf commented Mar 16, 2020

Microsoft.CodeAnalysis is a metapackage that contains no dlls at all. instead it references all other roslyn packages. It exists as an easy way to take a dependency on a specific version of all roslyn assemblies.

Microsoft.CodeAnalysis.Common is a set of common libraries that all other roslyn packages have a dependency on. It is unlikely you ever need to reference this package directly.

From reading through the issues you posted elsewhere @TehWardy this may be an issue with the Azure Functions and which set of runtimes/dependencies it supports. I would file an issue on https://github.com/Azure/azure-functions-host

@TehWardy
Copy link
Author

Thanks @jmarolf ... surely if that dll is not really a thing then I wouldn't be getting ...

Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

... it's like it's looking for that specific dll (hense my confusion here).
I will do as you say though, and drop this in to the functions host team.

@TehWardy
Copy link
Author

Sooooo .... I did some more testing ... created a new azure functions v3 project on top of .Net Core 3.1 and added the package Microsoft.CodeAnalysis.CSharp.Scripting v3.4.0

then built and ran it.
Didn't get this problem, so I took a look in the build output folder and ...

image

... i'm confused ... clearly this dll is a thing and actually exists somewhere.
When I apply the changes to my main solution (match up the project file to reference the same stuff, same versions, ect) and run that, I still get this exception.

@TehWardy
Copy link
Author

This is now confusing me ... when it ran fine before that was my build output, since I added the code to actually use from Azure/azure-functions-host#5796 It's no longer spitting out the same output ...

image

@TehWardy
Copy link
Author

Ok on the functions ticket i've updated it to reflect that this problem only happens when I wrap this code in the Azure Functions framework, a standard console app doesn't suffer this problem so IMO this points to it defintely being a Functions Hsot issue.

@jmarolf
Copy link
Contributor

jmarolf commented Mar 16, 2020

To further clarify Microsoft.CodeAnalysis.Common is the nuget package that contains Microsoft.CodeAnalysis.dll (not the Microsoft.CodeAnalysis package).

@TehWardy
Copy link
Author

Good to know ... thx :)

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