Re: general strong name question



Let me understand correctly. I'm pretty sure I see your problem.

Is this the situation? --

1. You have a project that compiles to a dll.
2. You are making file references (not project references) between other
visual studio projects and this compiled assembly. (in other words, the
other solution files do not contain this project, but the other projects do
refer to the location, on the hard drive, of this compiled assembly).
3. Each time you recompile this assembly, and attempt to run the other apps,
the attempt fails and you want to know why, and what you can do about it.

Correct?

Answer: When you compile an assembly, Visual Studio creates a "manifest"
which provides the name and version of every assembly that is referenced.
So, when you compile your applications, the are referring to a specific
version of your DLL. If you then recompile the DLL, without recompiling the
dependent applications, then the manifest of the assembly will provide an
old version number. The applications will generate an error when they
cannot find the correct assembly (with the correct version number) and will
fail.

The solution is one of four things:
Either
A) specify the version number, so that ever time you recompile, the same
version number is used, or
B) create a solution file that contains all the projects that depend on this
DLL. That way, when you recompile and change the version, you can recompile
the applications automatically,
C) create a make file or nant script that will recompile all the dependent
applications (basically, the same concept as (B) but external to Visual
Studio).
D) hard code the assembly binding information (needed to resolve the
assemblies) into the config files of the applications that use the
independent assembly.

Some very useful links:
http://blogs.msdn.com/suzcook/archive/2004/05/14/132022.aspx
http://community.sgdotnet.org/forums/5614/ShowPost.aspx


Hope this helps,

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
<marcel@xxxxxxxxx> wrote in message
news:1120509563.705553.181690@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
> the Version will be changed by every compiling, because I use the *
> character.
> E.g. [assembly: AssemblyVersion("1.0.0.*")].
>
> I have read that there are a possibility to configure the used version
> in the config file of the application which includes my assambly. Is
> this right and how I can do this?
>
> thanks a lot
> marcel
>


.



Relevant Pages

  • Re: MSIL
    ... The pdb file is created when you compile your assembly with debugging ... dll or exe and is needed to debug assemblies at the source code level. ... If you have an example of output that does not compile, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: MSIL
    ... The pdb file is created when you compile your assembly with debugging ... dll or exe and is needed to debug assemblies at the source code level. ... If you have an example of output that does not compile, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: MSIL
    ... The pdb file is created when you compile your assembly with debugging ... dll or exe and is needed to debug assemblies at the source code level. ... If you have an example of output that does not compile, ...
    (microsoft.public.dotnet.general)
  • Re: Dotnet Assembly Versioning
    ... The reason you have to recompile is that when you compile, ... getting a copy of the .dll and bringing it locally into your application. ... This only happens when you compile so, if you want the newer assembly, you ... First i have to state this is my first entry ever in a forum. ...
    (microsoft.public.dotnet.general)
  • Re: .NET Assemblies and Search Paths
    ... (.dll and .module). ... in Delphi that prevents it from being able to properly ... It looks as though the .NET assemblies I'm using are ... I was able to successfully compile them ...
    (borland.public.delphi.ide)

Loading