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

Outdated reference to Microsoft.Web.Infrastructure #170

Closed
dcorriveau-omniscient opened this issue Jan 15, 2016 · 11 comments
Closed

Outdated reference to Microsoft.Web.Infrastructure #170

dcorriveau-omniscient opened this issue Jan 15, 2016 · 11 comments
Assignees
Labels
Milestone

Comments

@dcorriveau-omniscient
Copy link

It seems Microsoft.Web.Infrastructure is now a Nuget package, so the nuspec file for SimpleInjector.Integration.Web should probably be updated from:

    <frameworkAssemblies>
      <frameworkAssembly assemblyName="Microsoft.Web.Infrastructure" targetFramework=".NETFramework4.0" />
    </frameworkAssemblies>

to:

    <dependencies>
      <dependency id="Microsoft.Web.Infrastructure" version="1.0.0" />
    </dependencies>

see: fsprojects/Paket#1393

Thanks.

@dotnetjunkie
Copy link
Collaborator

Are you experiencing any problems with the GAC reference?

@dcorriveau-omniscient
Copy link
Author

As far as I can tell it's only installed in GAC when some tools are also installed (probably some components of Visual Studio) which means it doesn't work on some environments, for example on a Server running my CI.

@dotnetjunkie
Copy link
Collaborator

The integration package exists for years and many developers use is in production, which means that full .NET 4.0 installations should contain this DLL. Is your build server configured with .NET 4.0-client perhaps?

@dcorriveau-omniscient
Copy link
Author

Actually it doesn't seem to work on a Win10 dev machine either...
If I run gacutil -l it's not listed, I'm guessing it should be ?
It's not in the C:\Windows\Microsoft.NET\assembly folders.
The assembly is found in various other locations on that W10 machine though, such as C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\... or C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\Web\Razor\v2.0
Not sure what I'm doing wrong ?

@dcorriveau-omniscient
Copy link
Author

Just tested gacutil -l on another dev box and he did have it in the GAC, so I'll have to find out why I don't (find what exactly should register it there).

@dcorriveau-omniscient
Copy link
Author

After looking at a few developers's boxes, it seems consistent that machines on WIN10 using VS Community don't have Microsoft.Web.Infrastructure registered in the GAC. So it does make sense that it worked in the past, but I'm suspecting more developers will report this. In any case I can still make it work by installing the required tools (even though it's not ideal), I'll let you determine what's best for SimpleInjector. Thanks !

@TheBigRic
Copy link
Collaborator

After some investigation it seems that Microsoft.Web.Infrastructure is a NuGet Package since .Net 4.5. I think it causes almost no troubles because a lot of other packages depend on this also and therefore it will be probably added as a NuGet package anyway.

Means that Simple Injector should reference the NuGet package IMO.

@dotnetjunkie
Copy link
Collaborator

it seems that Microsoft.Web.Infrastructure is a NuGet Package since .Net 4.5. I

Is that nuget package compatible with .NET 4.0, because the integration package is .NET 4.0.

@Selvaticus
Copy link

Hi,

Right now I'm having trouble adding the SimpleInjector.MVC3 because of this, as I don't have the Microsoft.Web.Infrastructure on the GAC but on the NugetPackages (and I would like to keep it that way, specially because of CI/CD server).

As far as I know, all version of the .Net framework 4.0 and above, are backward compatible as they use the same CLR version, this would mean that applications built for 4.0 can run on 4.5, the reverse will not be true if the code uses new features only introduced on latter versions. MSDN. This will all come down to which features that Nuget packages uses or not.

IMO, as the .Net teams move their code more and more to a OS agnostic architucture (with ASP.NET 5) dependencies on Nuget is the way to go, as one could deploy to OS without GAC or similar functionality.

Any solution to this problem will be greatly appreciated.

@dotnetjunkie
Copy link
Collaborator

Hi @Selvaticus,

the SimpleInjector.MVC3 NuGet package is the quick start package. All this package does is injecting a specific code file into your project and link to the appropriate NuGet packages that contain the actual assemblies.

When the SimpleInjector.MVC3 package gives you trouble, you can simply ignore it and reference the SimpleInjector.Integration.Web.Mvc and use the integration guide as described here.

Rest assured that we will fix this problem in the future.

@dotnetjunkie dotnetjunkie added this to the Simple Injector v3.1.3 milestone Apr 5, 2016
dotnetjunkie pushed a commit that referenced this issue Apr 5, 2016
SimpleInjector.Integration.Web NuGet package now references the
Microsoft.Web.Infrastructure NuGet package instead of the
Microsoft.Web.Infrastructure.dll from the GAC. (fixes #170)
@dotnetjunkie dotnetjunkie self-assigned this Apr 5, 2016
@dotnetjunkie
Copy link
Collaborator

Fixed in v3.1.3.

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

No branches or pull requests

5 participants