Cannot register assembly error when trying to Register

Add-in Express™ Support Service
That's what is more important than anything else

Cannot register assembly error when trying to Register
 
tf teck




Posts: 9
Joined: 2010-02-23
When I sel ect the option "Register ADX Project" I am getting an error that says

Error 3 Cannot register assembly "E:\projects\IE_Toolbar\myfirsttoolbar\bin\Debug\myfirsttoolbar.dll". Exception has been thrown by the target of an invocation.

I am not sure what is causing this or what I could do to prevent this fr om happening?
Posted 23 Feb, 2010 18:20:20 Top
tf teck




Posts: 9
Joined: 2010-02-23
When I sel ect the option "Register ADX Project" I am getting an error that says

Error 3 Cannot register assembly "E:\projects\IE_Toolbar\myfirsttoolbar\bin\Debug\myfirsttoolbar.dll". Exception has been thrown by the target of an invocation.

I am not sure what is causing this or what I could do to prevent this fr om happening?
Posted 23 Feb, 2010 18:21:14 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hi,

BTW, what's your name?

Does the same occurs for a new empty project? If not, try commenting moving all custom code from the constructor of the module to the OnConnect event available in the module's properties. The same applies to all custom complex-type initalizers defined on the class-level of the module.


Andrei Smolin
Add-in Express Team Leader
Posted 24 Feb, 2010 05:10:01 Top
tf teck




Posts: 9
Joined: 2010-02-23
Hello Andrei

My name is Vivek.

Thanks for your help. I don't know but you knew the exact problem in my code and your suggestion instantly fixed it. Thanks man!

Hey, but now I have a new issue. I followed the instructions in your help file to create a setup project for my toolbar. However, when I attempt to compile the setup project, it gives me an error saying:

"Error 2 'PostBuildEvent' failed with error code '1' 'Unspecified error'"

Can you please tell me what I am doing wrong?

I have written this in the PostBuildEvent of my setup project - "{Add-in Express folder}\Bin\adxpatch.exe" "$(BuiltOuputPath)" /UAC=Off" - this is exactly as instructed in the help file.

Thank you!
Posted 24 Feb, 2010 14:26:07 Top
tf teck




Posts: 9
Joined: 2010-02-23
Andrei

Please ignore my last question. I used "create setup project" option from Visual Studio and it worked quite fine for me except that the toolbar doesn't show up in IE 8.

Can you please tell me why the setup is not working for IE 8?

I also have a couple of questions regarding the publish option:

- After I have uploaded the publish folder to my web server. Which file do link the download link on my site to - should I link it to the .exe file generated in the publish/1033/1.0.0/ folder?

- When I tried doing so and selected Run for the exe, the setup hung up saying it was not able to connect to the server. Do you know what could be causing this?

Could you please address these questions?

Thank you
Vivek
Posted 24 Feb, 2010 15:55:17 Top
tf teck




Posts: 9
Joined: 2010-02-23
Ok, so please ignore my question regarding IE 8 as well. I got that to work too.

Please address my question regarding the issue I am getting during the publish process though.

Also, I have one more question (sorry to keep changing the question I have):

I want to generate a unique id and store that with the toolbar. As in I would like the value to be available to me inside the code but be unique for each installation of the toolbar. Do you know the best way for me to achieve this and the place to store it?

Also, after the installation is through I would like a new instance of IE to open on the user's machine with a default URL (as programmed within the code). How will I be able to achieve this?

Thank you!
Posted 24 Feb, 2010 17:03:41 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hi Vivek,

tf teck writes:
- After I have uploaded the publish folder to my web server. Which file do link the download link on my site to - should I link it to the .exe file generated in the publish/1033/1.0.0/ folder?


That folder can contain two .EXE files:
- setup.exe - if you set the "Create setup program to install prerequisites components" in the Prerequisites dialog (see the Prerequisites button in the Publish dialog)
- {your project name}.exe - the downloader

If you have setup.exe in that folder, you need the download link to point to that file. Otherwise, you need to use the downloader.

tf teck writes:
- When I tried doing so and selected Run for the exe, the setup hung up saying it was not able to connect to the server. Do you know what could be causing this?


Please make sure that the server is available.

tf teck writes:
I want to generate a unique id and store that with the toolbar. As in I would like the value to be available to me inside the code but be unique for each installation of the toolbar. Do you know the best way for me to achieve this and the place to store it?


Consider modifying the .MSI file on the fly using the MSI SDK. Say, when the user clicks a download link, you can create another copy of the original .MSI, change it, store the downloader and changed .MSI to a location (also setup.exe and prerequisites if they exist), generate a page pointing to the dowloader in that location, and show the page.

tf teck writes:
Also, after the installation is through I would like a new instance of IE to open on the user's machine with a default URL (as programmed within the code). How will I be able to achieve this?


You can run "iexplore.exe defaultURL" in your code.


Andrei Smolin
Add-in Express Team Leader
Posted 25 Feb, 2010 07:19:49 Top
tf teck




Posts: 9
Joined: 2010-02-23
Andrei

I think you completely misunderstood my question regarding generation of unique id and opening URL in IE. However, please ignore that since we have already managed to resolve it at our end.

However, the publish thing is still not working properly. I checked the URL given in my XML and that URL is working perfectly fine. But still the installer continues to give a server error.

Please let me know what could be causing that to happen?
Posted 25 Feb, 2010 14:30:02 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hi Vivek,

tf teck writes:
However, the publish thing is still not working properly. I checked the URL given in my XML and that URL is working perfectly fine. But still the installer continues to give a server error.


The only help for such an issue is:

ClickOnce Deployment
Make sure that your IIS is allowed to process .application files. For instance, on a PC of ours, we had to edit the urlscan.ini file created by UrlScan (see http://support.microsoft.com/kb/307608). The only change was adding the .application extension to the AllowExtensions list. The full file name is C:\WINDOWS\system32\inetsrv\urlscan\urlscan.ini.



Andrei Smolin
Add-in Express Team Leader
Posted 26 Feb, 2010 06:10:08 Top