I have a WPF application source code when I am trying to open it in visual studio 2017 then it's giving error like
Unknown build error, 'Cannot resolve dependency to assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.'
I have search for related links but it's not resolve issue. Please can you help me to resolve this issue ?
Link which I get for resolve the issue is Getting an error Cannot resolve dependency to assembly System.Web
First of all check .chproj file of directory and remove system reference. And after that you should add reference manually System and system.web which required for your application. Error clearly indicating for dependency to assembly so please check and add required assembly from reference.
Related
Using Visual Studio 16.6, migrating WPF app to target .netcore3.1(.300). Cannot compile with error below:
Error MC1000 Unknown build error, 'Could not find assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly.' MyApp C:\Program Files\dotnet\sdk\3.1.300\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.WinFX.targets 225
I don't seem to have any need or reference for System.Web
I see similar things here but am on current versions:
https://github.com/dotnet/wpf/issues/2648
Any ideas?
There seemed to be an issue with the structure of the project file. I don't reference System.Web but a third party DevExpress component does.
When you target .netcoreapp31 AND net472, the Nuget packages do not seem to get pointed to the target frameworks correctly. The project file needed to be manually restructured to point them to the correct frameworks.
Details here:
Issue on github dotnet/wpf
In my ASP.NET application I am getting an error sometimes. When I refresh the page error will be gone. The error is,
Could not load file or assembly 'FSharp.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I am thinking that some of my app assemblies reference this assembly. Is it possible to get all refrences recursively. I mean, I will get all reference assemblies of my application, all reference assemblies of my application's reference assemblies and so on.
Use this tool to find the DEpendencies
"NDepend"
http://www.ndepend.com
You can use a free AssemblyInfo tool to see the assembly dependency graph.
You can investigate your assemblies for references using a tool like .NET Reflector
I'm amateur in c#, I learned basics and start programming, I try to download open source projects from svn of sf.net but in compile of most of them I faced with an error like this:
build error, 'Cannot resolve dependency to assembly '
and in continue of error it give a publicKeyToken and no line give me.
What is wrong? I just open project with Visual studio .net 2010 and try to debug. please help me.
Seems that you have some assembly reference which may not exists or may have wrong details.
You need to either correct the details in the web.config or you need to install assembly reference to your c drive
Cannot resolve dependency to assembly 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' because it has not been preloaded.
When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on >demand through the ReflectionOnlyAssemblyResolve event.
To resolve it you can just switch off in VisualStudio: Debug->Exceptions->System.IO
I'm stumbling my way around Orchard CMS and want to override the default template for the RemoteRSS widget from Vandelay Industries. The current template is located at:
~/Modules/Vandelay.Industries/Views/Parts/RemoteRss.cshtml
So,
Is it possible to override this template
If so, where do I place my new template, so as to not 'damage' the original
I've tried saving it as:
C:\inetpub\wwwroot\cc_orchard_live_2012\Themes\FlexoPurchased\Views\RemoteRss.cshtml
C:\inetpub\wwwroot\cc_orchard_live_2012\Themes\FlexoPurchased\Views\Parts.RemoteRss.cshtml
C:\inetpub\wwwroot\cc_orchard_live_2012\Themes\FlexoPurchased\Views\Parts\RemoteRss.cshtml
but these either seem to not take effect or even cause an error.
Thanks in advance.
Additional Info
C:\inetpub\wwwroot\cc_orchard_live_2012\Themes\FlexoPurchased\Views\RemoteRss.cshtml
Doesnt appear to have any effect.
~/Modules/Vandelay.Industries/Views/Parts/RemoteRss.cshtml
Same code here works fine however.
C:\inetpub\wwwroot\cc_orchard_live_2012\Themes\FlexoPurchased\Views\Parts.RemoteRss.cshtml
causes a runtime error: Compiler Error Message: CS0012: The type 'System.Xml.IXmlLineInfo' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
C:\inetpub\wwwroot\cc_orchard_live_2012\Themes\FlexoPurchased\Views\Parts\RemoteRss.cshtml
throws a runtime error: Compiler Error Message: CS0012: The type 'System.Xml.IXmlLineInfo' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
You need to reference System.Xml from your theme's project in order to be able to override that template.
You can overcome this problem by copying System.Xml.dll into your site's /bin folder. No further configuration is needed.
If you don't know where to find this file, create a new web project, add a reference to System.Xml to your project, right click on the new reference in the references list, go to the Copy Local property and change it to true. When you build the project, System.Xml.dll will be copied to your project's /bin directory. You can get it from there.
I recently added the package LinqToExcel to my .net 4 WPF project and now when entering the designer I am presented with the following error:
System.IO.FileNotFoundException
Could not load file or assembly 'Castle.DynamicProxy2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The system cannot find the file specified.
LinqToExcel only has one dependency - log4net, which it installed as part of the NuGet process. Both are referenced and set to Copy Local. I'm not sure where the reference to Castle is coming from or how to go about fixing it.
Does anyone have any suggestions?