visual studio 2010 could not load file or assembly - c#

I know there is plenty of question on that subject, but I didn't find any useful answer about my problem.
I got a project from a co-worker using mercurial. Now when i open the project I cannot open any C# file and I get the following message:
Could not load file or assembly, 'Microsoft.MSXML, Version =8.0.0.0,Culture = Neutral, PublicKeyToken=b03ff5f7f11d50a3a' or one of its dependencies. The file specified is unfindable.
Any idea? I don't know exactly what is in the code, in fact I've never see or programmed the code until now, but I know the code is working and my co-worker manage to make a installer and the software is working fine.

Try to install Microsoft Core XML Services to solve this problem

There was a problem inside Visual Studio 2010.
My resolution was:
I tried to create a basic C# applicaiton but the same error message pop-up
I tried to re-open a old project that I used to work on but the same error message pop-up.
So I used the following utility. I made a fresh install and how everything is working. I don't think it is the most efficient solution , but it worked.

Simply delete all folders in this path then rebuild your project.
C:\Users\'username'\AppData\Local\Temp\Temporary ASP.NET Files\root

Related

Can't Find DLL (Visual Studio 2008)

Right now I'm trying to write a program for a sensor to collect data with. The sensor manufacturer released an SDK that has example code in it. I haven't made any changes to the code and am only attempting to use their examples to figure out how to make my own code work with the sensor. I've opened it up with Visual Studio 2008 and attempted to run the code as both debug and release. In both cases, it stops when it can't find the manufacturer's dll files.
I've copied the files in question to the same folder with the project in it and the problem persists. I've been to multiple forums and downloaded things and nothing has worked. I've run Dependency Walker which indicated issues with ieframe.dll and ieshims.dll. I copied both files from the IE folder and into the system32 folder and then registered them with an elevated command prompt. This fixed the issue with ieshims but ieframe persists. I tried downloading the latest IE (11) but that just introduced more issues and failed to fix the ieframe issue.
I'm not really sure how to proceed and any help would be appreciated.
The dll needs to be in the same folder as the executable. I use a shortcut/link within VS to achieve this. The result looks like this:
See this post for more details and an example.
Are you getting other errors besides the .DLL errors? If so, you need to get ride of those errors. Once you get rid of those errors your DLL errors should go away then.

Missing project sub type error when trying to create a new MonoGame project

Hello Im using Visual Studio 2012 and whenver I try to create a new MonoGame content project I get this error...Also if I try to start a windows Mono project or a Android mono project I dont get the same error but whenever i try to compile i get errors, i have unstillaed Mono and xamarin and tried installing and that never solved the issue the only thing left to do is uninstall Visual Studio 2012 but that can take a ton of time so if anyone here can help me it will be appreciated here is the link to the following error.
I think I have a workaround for you, although, I still don't fully understand the issue myself and I'd love someone to shed some light on it.
If you open up the project file as plain text you will see a ProjectTypeGuids like so:
<ProjectTypeGuids>{9B831FEF-F496-498F-9FE8-180DA5CB4258};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
If you Google each GUID you will find that one of them is DotNetProjectSubtype id="MonoGame" and the other is Windows (C#).
As far as I can tell you can safely delete the MonoGame one and proceed with your day. I believe it's only used at project creation time.

Issues debugging WCF Service

So I'm having an intense amount of trouble trying to debug a wcf service, and could use some help. The service I'm writing is in C#, Visual Studio 2010, and is part of an existing service my company has in one of our client's projects. I'm using WCFTestClient to connect to the service when i debug it locally. Whenever I first open up visual studio and debug the service in question it works fine, but if I make changes to the code and need to rebuild, I'm getting the following error:
Unable to copy file "obj\Debug\Application.DataAccess.dll" to
"bin\Debug\Application.DataAccess.dll". The requested operation cannot
be performed on a file with a user-mapped section open.
The only way I've been able to work around this issue is to close visual studio and reopen it, which is rather time consuming and annoying to do every time I make a change. I've tried cleaning the solution and rebuilding, but I get the same error. I've even opened up Process Explorer to try and find what's using the dll, but the only thing is FxCopCmd.exe which is part of visual studio.
Does anyone have a better way of debugging wcf services locally, or have an idea of how to prevent or resolve the above error? Any help is greatly appreciated, thanks.
I was having the same problem (FxCopCmd.exe locking some DLLs) and I found out that people using this extension "Visual Studio Achievements For VS2010" were also experiencing similar issues (see the comments on this page).
Removing this extension from Visual Studio solved the problem for me.
Go to the Windows folder of solution location and delete all bin / obj / debug DLL's manually rather than cleaning the solution. Should work then (had same issue at my end when I took latest of existing WCF from TFS and while building it gave me error)
As stated here: The requested operation cannot be performed error when compiling an XNA project
Closing project settings file solved the problem for me.

C# - error : Unable to read the project file

Have a bigSmall problem here.
I cant open any type of project in visual studios. Even when i creating a new one I get the error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319
The element <#text> beneath element is unrecognized.
When I choose to open a SLN file or open trough File>Open>Project/Solution I get an other error:
One or more projects in the solution were not loaded correctly.
Please see the Output Window for details.
Anyone knows? Seen some solutions on the net but it doesnt seem they help me with this.
Thanks.
<>
I have reinstalled Visual Studios but the bug remain.. Seriously. Ripping my hair of. Really need this to work!
Have you maybe installed a Plugin that make problem?
I had the same error. What I did was replace the ControldeMenu.csproj that is found in the project directory, for a backed-up copy, that was what worked for me.
I uninstalled and reinstalled the .NET framework and resolved the issue.

Visual Studio 2008 crashes when opening solutions in a TortiseSVN directory? How do I fix this?

I'm using TortiseSVN for my subversion client on a Windows Server 2008 box and I've got a folder with code checked out into it.
When I go to open the solution file that's under source control Visual Studio 2008 starts and before it can even finish loading the solution from what I can tell Visual Studio crashes. I'm trying to open a solution that has VB code in it. It gives no error messages or warnings. It's just gone.
I have checked the files and they all seem fine. The solution file seems fine when I look at it with a text editor.
This is also Visual Studio 2008 SP1 and I've got all the latest .NET service packs installed.
Has anyone else seen this before and know how to fix it?
Edit: I just did an SVN export to a new directory and it still crashes in the exported directory where there is no longer any SVN attached to it.
Additionally, it crashes EVERY time I try to open the project that came from SVN.
You should be looking at the solution file with an xml editor, at least then you will get some help for subtile flaw's in the formatting or something like that.
You can also submit feedback to Microsoft on the VIsual Studio Connect site, if the bug turns out to be real.
Some commonsense things todo however would be, goto your visual studio command prompt, start off with "devenv /ResetSettings", that often helps isolate any weirdo add-on or something lke that.
Also, try to build clean with msbuild or vcbuild, then build fully with either one (i.e. if vcbuild can not build your solution, use msbuild). That can help by laying out the symbols and such and maybe clear out some corrupted file or something.
You also may have .suo files from your subversion, those are binary files that do contain some settings, it's common for people to accidentially check them in, but they are usually better off being kept on a per-developer basis (not in the source tree). The /resetsettings will likely clear these out also, but you may want to make sure.
You can also double check the path's to all of the assemblies referenced, that your not going from a 32/64 bit host, and the CLR DLL's are in different path's now etc...
One last thing, if your really stuck, you can get a stack trace and debug the crash a bit ;), see where the fault is occuring and search that module online, your'll often find that somebody may have a specific solution.
Oh yeah, also, hooker's can be trickey. Don't trust them for a minute. Make sure you set tsvn's "only load in windows exlporer" option and configure it specifically for what folders on your system have local-svn working directories, this will greatly reduce the working set for their shell extension. On most any system, over time, one program or another (apple irw.exe or adobe pdf-preloader.exe sort's of ad-ware) will try to work it's way into your shell. You should try to make sure your dev box is rather clean from anything hook's, simular to what VladV was saying...
I had a similar problem and I fixed it and afterwards I wasn't quite sure how I managed it.
It basically involved going to the tools/options menu and setting the source control plugin to none. However, I obviously had to have had the solution open in Visual Studio if doing this was to fix the solution, but yet I thought the problem was I could not open the solution.
The only possible scenario would be if I was able to open the solution, but not open any of the projects inside it, hence able to change the source control settings immediately after opening the solution.
Does that make sense?
Try opening your solution and projects files in a text editor, and looking for anything strange.
I once heard of a similar problem: a solution contained SVN bindings created by AnkhSVN, but Visual Studio had no AnkhSVN installed, and failed to open the solution without giving any meaningful error information.

Categories

Resources