Developer forum

Forum » Swift » Dependency issue

Dependency issue

Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

Hello,

I'm setting up a local dev solution with the latest swift release. Somehow I got into a dependecy problem.

I have an error around te User object (but I do have a reference to Dynamicweb.Security 11.1.8) : 

Severity Code Description Project File Line Suppression State
Error CS0012 The type 'User' is defined in an assembly that is not referenced. You must add a reference to assembly 'Dynamicweb.Security, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. 2_Files_Templates_Designs_Swift_Paragraph_Swift_ProductDetailsInfo.cshtml C:\Projects\DynamicWeb\Solutions\mtbmuseum\Swift\Files\Templates\Designs\Swift\Paragraph\Swift_ProductDetailsInfo.cshtml 17 Active

When i try to update Dynamicweb.Security to 12.0.0 I get:

Severity Code Description Project File Line Suppression State
Error Unable to resolve dependencies. 'Dynamicweb.Extensibility 4.0.2' is not compatible with 'Dynamicweb.Diagnostics 4.0.2 constraint: Dynamicweb.Extensibility (>= 5.0.0)', 'Dynamicweb.Logging 6.0.0 constraint: Dynamicweb.Extensibility (>= 5.0.0)', 'Dynamicweb.Security 12.0.0 constraint: Dynamicweb.Extensibility (>= 5.0.0)'.
 
However I cannot select a higher version than 4.0.2 for Dynamicweb.Extensibility
 
What am I missing here?
 
Justin

Replies

 
Nicolai Pedersen
Reply

Can you show us the project configuration?

How was your project created? 

You should only reference assemblies that you target directly - and not install with references (Ignore dependencies) it is much simpler.

 
Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

I have forked dynamicweb\Swift to my own repository. https://github.com/Justinvolved/MTBMuseum

From that repo I have cloned to my local system. After that I opended the Solution (Swift.sln Which I have rename to MTBMusem.sln), and no errors are shown initially. When I open a Template file for instance Swift_ProductDetailsInfo.cshtml I get a list of errors:

Then I started adding some refrences, but get stuck, and I agree that I am adding more references than I am happy with ;-)

They are intellisense errors, not build errors, if I switch to "Build" in the error list nothing is shown.

I would like to make a copy of some templates, so I can create a custom version so for that reason I'm looking to get to a clean error list, for that i would like IntelliSense to work :-)

 

 
Nicolai Pedersen
Reply

After forking, right click your solution and choose Restore Nuget Packages

You might have to build (it does not do anything, but VS can be a bit 'slow' to understand).

 
Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

VS thinks:

All packages are already installed and there is nothing to restore.
Time Elapsed: 00:00:00.0174944
========== Finished ==========

After that a rebuild, and still the same result :-(

 

You must be logged in to post in the forum