Cannot add Add-In Express form to existing VS 2013 C# project, or reference existing form

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

Cannot add Add-In Express form to existing VS 2013 C# project, or reference existing form
 
SimonKravis




Posts: 17
Joined: 2013-11-25
I have a C# Windows form project using VS 2013 and would like to add an option to launch it from MS Outlook 2010. However, if I try to add a new Add-In Express form to the project I get the message "It is not allowable to add this item to a non-Add-In Express based project". There is nothing in the project properties as shown in VS 2013 to indicate that that the project is or is not an Add-In Express based project. Is it possible to modify the project to allow Add-In Express forms to be added?

I am able to create a new project in the parent solution of type ADX Com Add-In via the Add New Project->Other Project Types-> Extensibility to which I can modify to create the required Outlook Add-in. However, If I try to add references to other projects in the solution, the addition via references works, but a yellow exclamation mark appears next to the added references and the new Add-In project will not build. Is the way in which I can add valid references to other projects in the solution?
Posted 11 Jun, 2019 23:02:29 Top
Andrei Smolin


Add-in Express team


Posts: 16681
Joined: 2006-05-11
Hello Simon,

You can only use Add-in Express forms in Outlook add-in projects: the implementation of the form class requires the project to have an add-in module which is the source of events that the implementation uses.

I suggest that you create a UserForm that you programmatically put upon this or that form depending on the context.

An Add-in Express project is a customized version of a Windows Desktop Class Library project. You add references to other projects as you do with other projects. If a reference is marked with an exclamation mark, this means something is wrong with the reference or the reference target. Use this link to find suggestions/solutions/workarounds etc.: https://www.google.com/search?q=visual+studio+reference+exclamation+mark.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 12 Jun, 2019 00:58:14 Top
SimonKravis




Posts: 17
Joined: 2013-11-25
Thanks for the prompt and useful help - the problem with the new Add-in Express project having yellow exclamation marks beside project references was because the .Net version was not the same as other projects in the solution. After fixing this I was able to build the project but when I try to publish it I get the message 'Publish error: Could not load file or assembly XXXX, Culture=neutral, etc. or one of its dependencies. The system cannot find the file specified' from the Add-In Express Wizard.
Posted 12 Jun, 2019 18:51:39 Top
Andrei Smolin


Add-in Express team


Posts: 16681
Joined: 2006-05-11
Hello Simon,

Your project references that assembly but there is no such assembly. Or, there is an assembly of the same name nut of the different version, culture, etc.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 13 Jun, 2019 02:53:27 Top
SimonKravis




Posts: 17
Joined: 2013-11-25
I have got past the publish error 'could not load file or assembly XXX.dll. Could not find file or one of its dependencies' -the dll was created in another project. When I looked at the dll with Depends.exe it showed an error "Could not find the section that shows the Import Directory'. Fortunately I have another version of the dll which loads OK when I reference it. I was then able to build the Add-In Express Outlook Add-In project OutlookTag and publish it successfully after providing it with a strong name. The publish screen is shown below
User added an image
However, if I click on the setup.exe file in the Publish folder I get the following error:

An error occurred trying to download 'http://localhost/outlooktag/outlooktag.application'.


The log file contains
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = SpecificSite {string}
Property: [NTProductType] = 1 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.3.0 {version}
Launching Application.
URLDownloadToCacheFile failed with HRESULT '-2146697210'
Error: An error occurred trying to download 'http://localhost/outlooktag/outlooktag.application'.
Posted 14 Jun, 2019 01:56:41 Top
SimonKravis




Posts: 17
Joined: 2013-11-25
The problem of errors on download affecting all ClickOnce applications seems to have disappeared for unknown reasons but I now have a different one which is equally problematic - see https://www.add-in-express.com/forum/read.php?FID=5&TID=15521&MID=80172#message80172.
Posted 16 Jun, 2019 22:41:42 Top
Andrei Smolin


Add-in Express team


Posts: 16681
Joined: 2006-05-11
Hello Simon,

We will look in that one soon.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 18 Jun, 2019 01:24:58 Top