I just recently ran into a new error that is confusing me quite a bit. I took a 3 week vacation and when I came back, I get this error, but ONLY on my local machine (never happened before I left). The code runs fine on the production box. Also, keep in
mind that we do constant updates where I work, so that is what I am suspecting caused the problem. Here is the error:
Could not load file or assembly 'System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The module was expected to contain an assembly manifest.
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The module was expected to contain an assembly manifest.
Source Error:
Line 477: SqlCommand cmdFillData = new SqlCommand(strFillData, conExists);
Line 478:
Line 479: conExists.Open();
Line 480:
Line 481:
One of my coworkers said that this could be caused by a machine.config file being altered, but my local machine never was. Any ideas? Thank you very much, and please let me know if there is anything I can clarify.
"If God exists, I hope he has a good excuse."
-Woody Allen
<div>GAC reinstallation - use "gacutil.exe assemblypath -i", from your vs.net command prompt</div>
Ok, I tried typing in: 'gacutil.exe c:\windows\assembly -i' into my VS2005 prompt, turns out that wasn't the correct syntax. THen I figured out it was:
Gacutil /i assembly path [options]
So I tried: 'Gacutil /i C:\WINDOWS\assembly'
And that didn't work, so I tried 'Gacutil /i C:\WINDOWS\assembly /f' to force it and that gave me the same error which is:
'Failure adding assembly to the cache: The Filename, directory name, or volume label syntax is incorrect.'
Now that is exactly the path I find my assemblies at now, what could be the problem, or what am I doing wrong?
Thanks again everyone.
UPDATE
Ok, figured out how to add it to my GAC, and that is still not it. (its 'gacutil -I "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Transactions.dll" from the regular prompt at C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin)
Now it is either a 'dependancy' as the error states, or something completely different. Can I just puss an entire GAC assembly reinstall?
"If God exists, I hope he has a good excuse."
-Woody Allen
WOOHOO! figured it out. After I reinstalled the 'System.Transactions' into my GAC, it didn't work, BUT - I forgot to restart VS, once I did... boom, it worked. Thank you ASP.net forums!!!
To install it into your GAC, simply navigate to:
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin
in your command prompt (not the .NET on, the regular one) and type in:
stupid
Member
414 Points
130 Posts
New error: 'Could not load file or assembly...'
Aug 13, 2007 06:33 PM|LINK
I just recently ran into a new error that is confusing me quite a bit. I took a 3 week vacation and when I came back, I get this error, but ONLY on my local machine (never happened before I left). The code runs fine on the production box. Also, keep in mind that we do constant updates where I work, so that is what I am suspecting caused the problem. Here is the error:
Could not load file or assembly 'System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The module was expected to contain an assembly manifest.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The module was expected to contain an assembly manifest.
Source Error:
One of my coworkers said that this could be caused by a machine.config file being altered, but my local machine never was. Any ideas? Thank you very much, and please let me know if there is anything I can clarify.
-Woody Allen
Bruce L
All-Star
18102 Points
2841 Posts
Re: New error: 'Could not load file or assembly...'
Aug 13, 2007 07:38 PM|LINK
System.Transaction should be part of .NET framework and it should be installed in the GAC. I suspect your update somehow removed it from the GAC.
Check to see if system.transaction is in the GAC.
http://www.discountASP.NET
stupid
Member
414 Points
130 Posts
Re: New error: 'Could not load file or assembly...'
Aug 14, 2007 04:11 PM|LINK
Ok, I do see:
System.Transactions Version 2.0.0.0
Is that the one I need? Or is there a seperate one called 'System.Transaction' with no S?
Also, what is the GAC and how would I go about reinstalling it?
Thanks for trying to help!
-Woody Allen
SRIDHAR ANJA...
Member
370 Points
92 Posts
Re: New error: 'Could not load file or assembly...'
Aug 14, 2007 04:35 PM|LINK
Looks like the reference path has been alterered. Pls check your references path for the assembly in the VS .NET IDE.
kckriegs
Contributor
2024 Points
435 Posts
Re: New error: 'Could not load file or assembly...'
Aug 14, 2007 05:01 PM|LINK
stupid
Member
414 Points
130 Posts
Re: New error: 'Could not load file or assembly...'
Aug 14, 2007 05:15 PM|LINK
How do I do that?
-Woody Allen
stupid
Member
414 Points
130 Posts
Re: New error: 'Could not load file or assembly...'
Aug 14, 2007 05:42 PM|LINK
Ok, I tried typing in: 'gacutil.exe c:\windows\assembly -i' into my VS2005 prompt, turns out that wasn't the correct syntax. THen I figured out it was:
Gacutil /i assembly path [options]
So I tried: 'Gacutil /i C:\WINDOWS\assembly'
And that didn't work, so I tried 'Gacutil /i C:\WINDOWS\assembly /f' to force it and that gave me the same error which is:
'Failure adding assembly to the cache: The Filename, directory name, or volume label syntax is incorrect.'
Now that is exactly the path I find my assemblies at now, what could be the problem, or what am I doing wrong?
Thanks again everyone.
UPDATE
Ok, figured out how to add it to my GAC, and that is still not it. (its 'gacutil -I "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Transactions.dll" from the regular prompt at C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin)
Now it is either a 'dependancy' as the error states, or something completely different. Can I just puss an entire GAC assembly reinstall?
-Woody Allen
stupid
Member
414 Points
130 Posts
Re: New error: 'Could not load file or assembly...'
Aug 14, 2007 07:04 PM|LINK
WOOHOO! figured it out. After I reinstalled the 'System.Transactions' into my GAC, it didn't work, BUT - I forgot to restart VS, once I did... boom, it worked. Thank you ASP.net forums!!!
To install it into your GAC, simply navigate to:
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin
in your command prompt (not the .NET on, the regular one) and type in:
gacutil -I "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Transactions.dll"
or change it to whatever .dll file you need installed
-Woody Allen
Markmoxe
Member
2 Points
1 Post
Re: New error: 'Could not load file or assembly...'
Apr 30, 2012 08:50 PM|LINK
Had this same problem on a small utility that I had packaged up for distribution internally. It stopped working on only one persons computer directly.
This was the actually helpful solution to this problem. Thanks!