BC2017 - Compiler Error - BC2000

M

Mythran

I keep having this BC2017 Compiler Error and have been able to duplicate it
on several machines...can someone help with a solution to this? I do know
of several ways to get this compiler error to go away until next compile,
and have a macro which will semi-fix this...but I need a permanent solution
(which may not exist)...

Steps to reproduce error:

1.) Create a VB.Net Web Application. (I created a virtual directory and then
created the .Net project under the path where the virtual directory points
to)
2.) Create a VB.Net Class Library in the same solution.
3.) Create a strong-name key file. (To create...VS.Net Command-Line:
sn.exe -k MyFile.snk)
4.) In AssemblyInfo.vb under the Class Library, add the attribute
AssemblyKeyFile...Ex: <Assembly: AssemblyKeyFile("X:\MyPath\MyFile.snk")>
5.) Add the project reference to the Class Library in the Web project.
6.) Compile and then test the web project (navigate to
http://localhost/projectnamehere).
7.) If #6 worked, go back into the web project or class library and add a
space, or make some other type of change inside one of the code files, then
recompile and repeat step #6...this is where I get the exception above.

Please let me know if you get the same error...and if you know a permanent
solution, let me know :)

To Temporarily Fix:

1.) Add a file to the web projects bin directory (File Monitoring going on
and it fixes it).
OR
2.) Change the mode of the Solution from Debug to Release then back to
Debug...don't have to compile again, just test.
OR
3.) Delete the Temporary ASP.Net Files contents....(once again, File
Monitoring)..

All three of the above force a recompile of the misl code.

Thanks in advance!

Mythran
 
L

LaRomeo

Mythran said:
I keep having this BC2017 Compiler Error and have been able to duplicate it
on several machines...can someone help with a solution to this? I do know
of several ways to get this compiler error to go away until next compile,
and have a macro which will semi-fix this...but I need a permanent solution
(which may not exist)...

Steps to reproduce error:

1.) Create a VB.Net Web Application. (I created a virtual directory and then
created the .Net project under the path where the virtual directory points
to)
2.) Create a VB.Net Class Library in the same solution.
3.) Create a strong-name key file. (To create...VS.Net Command-Line:
 
L

LaRomeo

I am having a very similar problem and I have tried re-installing IIS,
the .NET Framework and repairing my Visual Studio install.

Your temporary fixes have been useful because until I read your post I
had to recompile again to view the page.

The strange thing with my issue is that I have another machine with the
exact same solution and setup and everything works fine, it seems to be
machine specific.

I hope you update your post if you find the solution and although I
have given up searching for now because I need to get my work done, I
will probably investigate more later.

Thanks,
Lisa..
 
M

Mythran

LaRomeo said:
I am having a very similar problem and I have tried re-installing IIS,
the .NET Framework and repairing my Visual Studio install.

Your temporary fixes have been useful because until I read your post I
had to recompile again to view the page.

The strange thing with my issue is that I have another machine with the
exact same solution and setup and everything works fine, it seems to be
machine specific.

I hope you update your post if you find the solution and although I
have given up searching for now because I need to get my work done, I
will probably investigate more later.

Thanks,
Lisa..

So far, I don't have an updated solution :( We are still using the macro
(which has been altered to run during each build, checking to see if we have
a project property setting set before running) so that we don't have to do
it everytime we get the error.

Oh well...

Mythran
 
L

LaRomeo

Update:

Since my last post I found out that this problem was not machine
specific, the problem did not occur until the second time I went into
the machine to test (after a reboot). I found this out because I
removed the first 3rd party dll that I was working with so I wouldn't
get the error but then I started using a second 3rd party dll,
everything was working fine for a while and then suddenly I started
getting the error again.

I searched on their web site (http://www.telerik.com/) and found the
following:

RESOLUTION:
The cause of the problem is not directly related to the telerik
controls -- that is a strange ASP.NET bug that is present in both
versions 1.0 and 1.1. It appears that ASP.NET does not properly
synchronize its shadow copy of the assemblies in the web application's
bin folder when the project gets rebuilt and the web application is
restarted. That happens most often when impersonation has been turned
on in the web.config by adding the tag:

<identity impersonate="true" />

It turns out that such problems occur when the web application is
restarted after recompilation only. Cleaning the Temporary ASP.NET
Files folder seems to remove the problem until the next application
compile. Possible workarounds for the problem might be:

- disabling the impersonation setting on the development machine, and
enabling it on deployment
- storing the offending assemblies in the Global Assembly Cache on
the development machine

I tried the first work-around and sure enough I no longer get the
error.

I know this doesn't fix the problem but I hope it helps.

Lisa..
 
M

Mythran

- disabling the impersonation setting on the development machine, and
enabling it on deployment
- storing the offending assemblies in the Global Assembly Cache on
the development machine

I tried the first work-around and sure enough I no longer get the
error.

I know this doesn't fix the problem but I hope it helps.

Lisa..

Thanks, I'll try it out...

Mythran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top