Try again, Re: Project Assembly Name Change Problems

Tech-Archive recommends: Fix windows errors by optimizing your registry



I guess my problem description was not clear?

When I change the assembly name in project properties (application tab) from
MyAp9 to MyAp10, I start to get an error on a directcast file read saying it
cant find MyAp9 (ie it is looking for the old name somehow):

ie This code:

Dim FileStream As New FileStream(NewName$, FileMode.Open, FileAccess.Read)

Drawings(DrawingIndex) = DirectCast(formatter.Deserialize(FileStream),
DrawingType)


gives this error:

Unable to find assembly 'MyAp9, Version=9.0.7.0, Culture=neutral,
PublicKeyToken=null'.


Since I changed the assembly name to MyAp10, why is it looking for MyAp9? If
I change the assembly name back to MyAp9 it reads fine.

Tom



"Cor Ligthert[MVP]" wrote:

Tracks,

Why do you do such a simple thing so difficult, you can simply change the
assembly name.
If you want to change the Exe name then have a look at he Project
properties.

Cor

"Tracks" <Tracks@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E810CAE2-D7C3-40CB-9683-276C1A26F063@xxxxxxxxxxxxxxxx
Hi all,

After 20 years I am now on version 10 of my program. Now using VS2008 with
VB.Net. You would think I could figure how to change the name?

I want to change my application name from MyAp9 to MyAp10 (ie the compiled
name should be MyAp10.exe). So I changed the project name, and in
settings-application I changed the assembly name and root name all to
MyAp10.
I change names in Assemby Info dialog and the I change all the version
numbers to 10 etc. Now when I run my ap I get the following error:

Unable to find assembly 'MyAp9, Version=9.0.7.0, Culture=neutral,
PublicKeyToken=null'.

On the following lines of code:

Dim FileStream As New FileStream(NewName$, FileMode.Open,
FileAccess.Read)

Drawings(DrawingIndex) = DirectCast(formatter.Deserialize(FileStream),
DrawingType)

If I change the assemby and root names back to MyAp9 it works.

What am I missing? Is the name of the app in the serialization setup
things
somewhere? Where else to you change names/versions?

Thanks, Tom

PS Why is it so hard to do something so simple?





.



Relevant Pages

  • Re: Try again, Re: Project Assembly Name Change Problems
    ... but what I do in these cases is searching for MyAp9 in all files. ... I changed the Assemby name (and root namespace) on the Properties page to ... >>> DrawingType) ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Try again, Re: Project Assembly Name Change Problems
    ... When I change the assembly name in project properties ... MyAp9 to MyAp10, I start to get an error on a directcast file read saying ... Since I changed the assembly name to MyAp10, why is it looking for MyAp9? ... If I change the assemby and root names back to MyAp9 it works. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Try again, Re: Project Assembly Name Change Problems
    ... I changed the Assemby name (and root namespace) on the Properties page to ... "Rebuild" solution as you suggest and still get the same error from ... After all this, I change the assem/root names back to MyAp9, works fine. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Project Assembly Name Change Problems
    ... I want to change my application name from MyAp9 to MyAp10 (ie the compiled ... settings-application I changed the assembly name and root name all to MyAp10. ... If I change the assemby and root names back to MyAp9 it works. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Project Assembly Name Change Problems
    ... Does the serialized object contain a reference to the prior assembly name? ... If I change the assemby and root names back to MyAp9 it works. ...
    (microsoft.public.dotnet.languages.vb)