Cannot add a dll to reference

G

Guest

Hi all,

I meet a problem in building my .Net Solution and I would like to seek help.
After I have added a dll to reference in one of my project in my solution,
when I re-build the solution, I meet the following error :

------ Rebuild All started: Project: OIDCOMMON, Configuration: Debug .NET
------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP' does
not have a strong name
Building satellite assemblies...
Satellite assemblies could not be built because the main project output is
missing.


------ Rebuild All started: Project: OIDDAL, Configuration: Debug .NET ------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP' does
not have a strong name
Building satellite assemblies...



------ Rebuild All started: Project: OIDBLL, Configuration: Debug .NET ------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP' does
not have a strong name
Building satellite assemblies...



------ Rebuild All started: Project: OID, Configuration: Debug .NET ------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP' does
not have a strong name
Building satellite assemblies...



------ Skipped Rebuild All: Project: OIDSetup, Configuration: Debug ------

Project configuration skipped because it is not selected in this solution
configuration


---------------------- Done ----------------------

Rebuild All: 0 succeeded, 4 failed, 1 skipped

=================================================

Thanks.
W.M. Chung
 
P

Peter Jausovec

Hi,

You have to create a strong name for referenced assemblies. To create a
strong named assembly you need to have a strong key file (key pair for
generating strong name). Use the command utility to create a key file: Sn -k
<destination_file> . Then open AssemblyInfo.cs(.vb) and add the following
line to it: [assembly: AssemblyFile("")]
 
G

Guest

Hello, thanks for your reply.

I think I have done what you mention. The problem is that after I add a
"ftp.dll" in my reference, the solution cannot be built.

But without the "ftp.dll", my solution can be built successfully.

So, how can I use the "ftp.dll" ?

Thanks in advance.

Peter Jausovec said:
Hi,

You have to create a strong name for referenced assemblies. To create a
strong named assembly you need to have a strong key file (key pair for
generating strong name). Use the command utility to create a key file: Sn -k
<destination_file> . Then open AssemblyInfo.cs(.vb) and add the following
line to it: [assembly: AssemblyFile("")]


--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
WM Chung said:
Hi all,

I meet a problem in building my .Net Solution and I would like to seek
help.
After I have added a dll to reference in one of my project in my solution,
when I re-build the solution, I meet the following error :

------ Rebuild All started: Project: OIDCOMMON, Configuration: Debug .NET
------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP'
does
not have a strong name
Building satellite assemblies...
Satellite assemblies could not be built because the main project output is
missing.


------ Rebuild All started: Project: OIDDAL, Configuration: Debug
.NET ------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP'
does
not have a strong name
Building satellite assemblies...



------ Rebuild All started: Project: OIDBLL, Configuration: Debug
.NET ------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP'
does
not have a strong name
Building satellite assemblies...



------ Rebuild All started: Project: OID, Configuration: Debug .NET ------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP'
does
not have a strong name
Building satellite assemblies...



------ Skipped Rebuild All: Project: OIDSetup, Configuration: Debug ------

Project configuration skipped because it is not selected in this solution
configuration


---------------------- Done ----------------------

Rebuild All: 0 succeeded, 4 failed, 1 skipped

=================================================

Thanks.
W.M. Chung
 
G

Guest

I finally can re-build the solution. I add the ftp.dll as reference to my
main startup project. Now it works.

It does not work when I add it as reference to other projects in my solution.

Thanks.

WM Chung said:
Hello, thanks for your reply.

I think I have done what you mention. The problem is that after I add a
"ftp.dll" in my reference, the solution cannot be built.

But without the "ftp.dll", my solution can be built successfully.

So, how can I use the "ftp.dll" ?

Thanks in advance.

Peter Jausovec said:
Hi,

You have to create a strong name for referenced assemblies. To create a
strong named assembly you need to have a strong key file (key pair for
generating strong name). Use the command utility to create a key file: Sn -k
<destination_file> . Then open AssemblyInfo.cs(.vb) and add the following
line to it: [assembly: AssemblyFile("")]


--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
WM Chung said:
Hi all,

I meet a problem in building my .Net Solution and I would like to seek
help.
After I have added a dll to reference in one of my project in my solution,
when I re-build the solution, I meet the following error :

------ Rebuild All started: Project: OIDCOMMON, Configuration: Debug .NET
------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP'
does
not have a strong name
Building satellite assemblies...
Satellite assemblies could not be built because the main project output is
missing.


------ Rebuild All started: Project: OIDDAL, Configuration: Debug
.NET ------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP'
does
not have a strong name
Building satellite assemblies...



------ Rebuild All started: Project: OIDBLL, Configuration: Debug
.NET ------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP'
does
not have a strong name
Building satellite assemblies...



------ Rebuild All started: Project: OID, Configuration: Debug .NET ------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP'
does
not have a strong name
Building satellite assemblies...



------ Skipped Rebuild All: Project: OIDSetup, Configuration: Debug ------

Project configuration skipped because it is not selected in this solution
configuration


---------------------- Done ----------------------

Rebuild All: 0 succeeded, 4 failed, 1 skipped

=================================================

Thanks.
W.M. Chung
 
N

Niloday

Hi,

Is this ftp.dll a .NET Assembly? If so then rebuild this assembly using a
strong name for that and your problem will be resolved.

Else if this is a com dll then you will still need to create one more Key
Pair file using sn.exe (as you have alredy created).
Copy this newly created keypair file in the project folder
Open the project property dialog box.
Navigate to "Common Properties", "General".
Enter the name of the snk file in front of the option that reads like ...
"Wrapper Assembly Key File"
Now compile your prioject and it should work.

Remember you will have to set this name for all the project that refer the
ftp.dll (you can use the same key pair file)

Regards
Niloday


WM Chung said:
I finally can re-build the solution. I add the ftp.dll as reference to my
main startup project. Now it works.

It does not work when I add it as reference to other projects in my solution.

Thanks.

WM Chung said:
Hello, thanks for your reply.

I think I have done what you mention. The problem is that after I add a
"ftp.dll" in my reference, the solution cannot be built.

But without the "ftp.dll", my solution can be built successfully.

So, how can I use the "ftp.dll" ?

Thanks in advance.

Peter Jausovec said:
Hi,

You have to create a strong name for referenced assemblies. To create a
strong named assembly you need to have a strong key file (key pair for
generating strong name). Use the command utility to create a key file: Sn -k
<destination_file> . Then open AssemblyInfo.cs(.vb) and add the following
line to it: [assembly: AssemblyFile("")]


--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"WM Chung" <WM (e-mail address removed)> je napisal v sporoèilo
...
Hi all,

I meet a problem in building my .Net Solution and I would like to seek
help.
After I have added a dll to reference in one of my project in my solution,
when I re-build the solution, I meet the following error :

------ Rebuild All started: Project: OIDCOMMON, Configuration: Debug ..NET
------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP'
does
not have a strong name
Building satellite assemblies...
Satellite assemblies could not be built because the main project output is
missing.


------ Rebuild All started: Project: OIDDAL, Configuration: Debug
.NET ------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP'
does
not have a strong name
Building satellite assemblies...



------ Rebuild All started: Project: OIDBLL, Configuration: Debug
.NET ------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP'
does
not have a strong name
Building satellite assemblies...



------ Rebuild All started: Project: OID, Configuration: Debug ..NET ------

Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC30145: Unable to emit assembly: Referenced assembly 'FTP'
does
not have a strong name
Building satellite assemblies...



------ Skipped Rebuild All: Project: OIDSetup, Configuration: Debug ------

Project configuration skipped because it is not selected in this solution
configuration


---------------------- Done ----------------------

Rebuild All: 0 succeeded, 4 failed, 1 skipped

=================================================

Thanks.
W.M. Chung
 

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