Am using visual studio 2010 - enterprise edition
when i try to start my visual studio it gives the error "Cannot load file or assembly : presentationcore "
I found this on the event log too
.NET Runtime Optimization Service (clr_optimization_v4.0.30319_32) - 1>Failed to compile: PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 . Error code = 0x80070002
any help will be grate full
Related
I recently moved from VS 2017 to VS 2019. Since upgrading I've been unable to open any .sqlproj projects in VS as they all refuse to load with the error -
Could not load file or assembly
'Microsoft.SqlServer.Management.SqlParser, Version=15.100.0.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
dependencies. The system cannot find the file specified.
Here's the interesting part. The Fusion Log shows me -
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.SqlServer.Management.SqlParser, Version=15.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///c:/program files (x86)/microsoft visual studio/2019/enterprise/common7/ide/extensions/microsoft/sqlcommon/130/Microsoft.SqlServer.Management.SqlParser.dll.
LOG: Assembly download was successful. Attempting setup of file: c:\program files (x86)\microsoft visual studio\2019\enterprise\common7\ide\extensions\microsoft\sqlcommon\130\Microsoft.SqlServer.Management.SqlParser.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: Microsoft.SqlServer.Management.SqlParser, Version=13.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: The assembly reference did not match the assembly definition found.
I read this as :
I need to load version 15 of this dll
It's not in the GAC
I am going to look under the ...sqlcommon\130 directory
I've found the dll
It's the wrong version, 13 not 15
I can see the dll under the c:\program files (x86)\microsoft visual studio\2019...\sqlcommon\150 directory which (I think) should be the correct version. Anyone have any idea why is it probing the 'wrong' directory and how can I get it to look in the correct one?
Any pointers in the right direction whould be hugely appreciated.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\TextTransform.exe" "C:\Project Code\City Lodge\City-Lodge\Server\Automation\Lodgix.Server.Domain.Automation......\Server\Automation\Lodgix.Server.MetaData\Templates\4 - Domain\DomainGenerator.tt"
error : An exception was thrown while trying to compile the transformation code. The following Exception was thrown:
System.IO.FileLoadException: Could not load file or assembly 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.VisualStudio.TextTemplating.CompilerBridge.PrepareNewCompilation()
at Microsoft.VisualStudio.TextTemplating.CompilerBridge.Compile()
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.Compile(String source, String inputFile, IEnumerable`1 references, Boolean debug, SupportedLanguage language, String compilerOptions)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I am currently facing a problem with TextTransform.exe from Visual Studio 2017. TextTransform.exe seems to work when I use -h but when I pass a template the above error gets thrown.
I debugged the same template using Run custom tool in Visual Studio and it worked fine.
Any suggestions would be really helpful.
I got the same problem as Build Error + Creating VSTO addin for excel 2010
After making the change according to the solution, I got the new error:
The "InitializeDefaultProperties" task could not be loaded from the
assembly
Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or
assembly 'Microsoft.VisualStudio.Tools.Office.BuildTasks,
Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one
of its dependencies. The system cannot find the file specified. Confirm
that the <UsingTask> declaration is correct, that the assembly and all its
dependencies are available, and that the task contains a public class that
implements Microsoft.Build.Framework.ITask.
I have installed VS2013 on the same machine so I change version=12.0.0.0 but I got a new error:
Error 2 The "SetInclusionListEntry" task could not be instantiated from
the assembly "Microsoft.VisualStudio.Tools.Office.BuildTasks,
Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Please verify the task assembly has been built using the same version of
the Microsoft.Build.Framework assembly as the one installed on your
computer and that your host application is not missing a binding redirect
for Microsoft.Build.Framework. Unable to cast object of type Micro
soft.VisualStudio.Tools.Office.BuildTasks.SetInclusionListEntry' to type
'Microsoft.Build.Framework.ITask'.
I know it's an old post, but maybe I have a solution for you...
I ran into exactly the same problem and I have to tell you that the "InitializeDefaultProperties" exception is not fix-able for VS2010.
First of all:
Make sure that your Visual Studio 2010 installation is not modified, anyway make a clean install just to be sure.
If you modified the C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets revert your changes.
If you now try to build your VSTO Project the following error should apppear:
The "FindRibbons" task could not be loaded from the assembly
Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file
or assembly 'Microsoft.VisualStudio.Tools.Office.BuildTasks,
Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or
one of its dependencies. The system cannot find the file specified.
Confirm that the <UsingTask> declaration is correct, that the
assembly and all its dependencies are available, and that the task
contains a public class that implements
Microsoft.Build.Framework.ITask.
My Solution:
--> Open Visual Studio 2010 (you dont need to load a Project)
--> Go to Help an click About Microsoft Visual Studio
--> Check Version
Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel Microsoft
.NET Framework Version 4.5.51209 SP1Rel
If it says RTMRel download the Microsoft Visual Studio 2010 SP1 from here: http://go.microsoft.com/fwlink/?LinkId=210710
It includes the necessary VSTO and VSTO 4.0 Runtime.
If thats not the Problem, I'm sorry...
As I encountered the same problem upgrading our build server... I am gonna put the solution here in case anyone needs it.
I think the way to solve this is to fix your GAC.
Open the .target file of that tool by notepad and take a look at the UsingTask tag, you should get something like
<UsingTask TaskName="InitializeDefaultProperties" AssemblyName=" Microsoft.VisualStudio.Tools.Office.BuildTasks", Version=11.0.0.0,..., PublicKeyToken=sthsthsth
Then, go to your GAC files, e.g. C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Office.BuildTasks
Then, create a new folder: v4.0_11.0.0.0_sthsthsth,
which is:
v<.NETFramework Version, mostly 4.0>_<Assembly Version>_<PublicKeyToken>
And then, put the .dll file of Microsoft.VisualStudio.Tools.Office.BuildTasks in it.
This dll should be obtained when you install VSTO either by directly install (VSTO2010) or by Visual Studio installer
e.g.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.BuildTasks.dll
for Visual Studio 2017 and then directly place the dll inside the folder created
Then this issue should be fixed. Good luck
I wrote a WebSite Project and a Web Api Project in Visual Studio 2013 Express for Web.
Now I installed additional to VS2013Web from my MSDN subscription Visual Studio 2013 Pro.
When I try to open my Projects in Pro, I get an error:
The Microsoft.VisualStudio.Web.Project.WebProjectPackage,Microsoft.VisualStudio.Web.Project package did not load correctly.
I should have a look into my ActivityLog.xml.
And there is:
<entry>
<record>273</record>
<time>2014/04/08 08:37:13.725</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Microsoft.VisualStudio.Web.Project.WebProjectPackage, Microsoft.VisualStudio.Web.Project]</description>
<guid>{AAB75614-2F8F-4DA6-B0A6-763C6DBB2969}</guid>
<hr>80070002</hr>
<errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Web.AzureAD.Contracts, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Das System kann die angegebene Datei nicht finden.</errorinfo>
</entry>
<entry>
<record>274</record>
<time>2014/04/08 08:37:13.730</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [Microsoft.VisualStudio.Web.Project.WebProjectPackage, Microsoft.VisualStudio.Web.Project]</description>
<guid>{AAB75614-2F8F-4DA6-B0A6-763C6DBB2969}</guid>
<hr>80070002</hr>
<errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Web.AzureAD.Contracts, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Das System kann die angegebene Datei nicht finden.</errorinfo>
</entry>
I still have VS2013Web installed. If I open my Project with this Version, everything is fine.
Any ideas, how to fix the Problem?
Might this error Comes up, because VS2013Web is in german and VS2013Pro is in english?
I tried also in NuGet Console:
Update-Package -Reinstall
But this breaks my web Project totally...
Could not load file or assembly 'Microsoft.VisualStudio.Web.AzureAD.Contracts...
"Azure" is surely the keyword here, Express does not support Azure out of the box. As described in this MSDN page, the Azure Tools must be installed and you must have the Web version of Express.
It is a separate download. You'll find the VS2013 Express for Web version of it here, pick the upper left one to get the installer.
Try like this -
Close Visual Studio 2013
Click the TOOLS--->VISUAL STUDIO COMMAND PROMPT to open the command window
Input the command "devenv /Setup"
Restart Visual Studio 2013
Error 24 Could not load file or assembly 'Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
error in visual web developer 2010 after debugging plz help me.