Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / May 2007

Tip: Looking for answers? Try searching our database.

DTE and MSI projects

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
schwier@itq.de - 03 May 2007 10:05 GMT
Dear NG,

ich have a problem since our upgrade for VS2003 to VS2005: In our
automated nightly build process we build some MSIs - in this process
we set the productcode and the version of the setup projects via DTE.

Therefore I wrote a VS macro, which is called through devenv
Solution.sln /command "Macros.MyMacros.Module4.testForNG
params" (example for NG, code is attached).

The problem is know: when we set the version in VS2005 through this
macro, we get a messagbox with text like this : "It is recommended to
upgrade the productcode when you change the version ... YES/NO/
CANCEL".

This is a great problem, because the messagebox stops the automated
build process ...

The question to you is:
* has anybody a solution for this on such a problem?

The only idea I have is to get a reference to this messagebox and
close it from code.
* does anybody know how to do this with DTE?
* or: which DTE Event is responsibel for this box?

An other Solution might be to write the productcode and version in the
*.vdproj via FSO - this is a solution I currently don't like to
implement.

Greetings from South Germany,

Dirk Schwier.

------------------------------------------------------------------------------------------------------------------------------------------------------------

   ' I have a solution with two projects:
   ' Project: HelloWorld.csproj, type Console App
   ' Project: Setup1, type: Setup Project
   Sub testForNG()

       Dim soln As Solution
       Dim projs As Projects
       Dim proj, activeProj As Project
       Dim props As Properties

       soln = DTE.Solution
       ' get all projects of current solution
       projs = soln.Projects

       ' search project by name
       For Each proj In DTE.Solution.Projects
           If (proj.Name = "Setup1") Then
               props = proj.Properties
           End If
       Next

       ' set ProductCode
       props.Item("ProductCode").Value() = "{" &
System.Guid.NewGuid.ToString & "}"
       ' set Version
       props.Item("Version").Value() = "1.0.0.0"

   End Sub
Mirko Matytschak - 08 May 2007 13:25 GMT
I would do exactly what you want to avoid: Writing directly into the vdproj
file. The format of the file is very easy to understand. We're doing this
for our automated builds and it works fine. All you need to know to use
Encoding.Default for the FileStreams. If you need a sample code, go to
http://www.netdataobjects.com/Portal/Support/EMailSupport/tabid/75/Default.aspx
and leave your EMail address together with a short notice. I'll send you a
solution with a few classes allowing you to manipulate Vdproj files.

Regards (mit Grüßen aus Miesbach)
Mirko

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.