473,383 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

VS 2002 vs. VS 2003 wizard problem

Hi,

I posted the messsage below last week, but no replies,
I've reproduced the problem with a VB macro, just create
one and paste the following code. Let me know of any
workarounds you can think of.
thanks,
-R a f i

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
Sub TestRelPath()
Dim file As VCFile
Dim col As IVCCollection
Dim idx As Integer
Dim prj As VCProject
prj = DTE.Solution.Projects.Item(1).Object
col = prj.files

'Add a file relative to the TEMP environment
variable
Dim foo As VCFile = prj.AddFile("$(TEMP)\foo.h")
MsgBox(foo.FullPath)

'The following should return a path relative to
the env var not .\
MsgBox(foo.RelativePath)
foo.RelativePath = "C:\Documents and
Settings\bkretzler"
MsgBox(foo.RelativePath)

'The following statement does not set the
RelativePath
foo.RelativePath = "$(TEMP)\foo.h"
MsgBox(foo.RelativePath)
End Sub
End Module

----------------------------------------------
Subject: VS 2002 vs. VS 2003 wizard problem
From: "Rafi" <ra*********@yahoo.com> Sent: 9/10/2003
11:16:51 PM

Hi,

(not sure if this is the right newsgroup or not, please
let me know)

We've developed an add-in with wizards, etc for VS 2002,
and worked without a problem. The changes has been made
for it to work with VS 2003, but there's a roadblock that
can't get around.
The wizards adds some files to the project relative to an
environment variable for example: "$(TEMP)\foo.c". This
is shipping to customers and works great in VS 2002, now
in VS 2003 it does not work, after the wizard (no code
has changed) finishes, the relative path is ".\$(TEMP)
\foo.c" which breaks everything. I was able to modify
manually the .vcproj after it is created to be "$(TEMP)
\foo.c" and work ok, but I'd like to handle that in the
wizard, has anyone ran into this problem? any ideas,
solutions?
I've got a wizard that exhibits the problem, let me know
if you want me to send it to you all, but below is a
JScript snippet
thanks,

......
var thefile = srcFolder.AddFile(strFilePath);

// This works - get RelativePath
var filepathinfo = thefile.RelativePath;

/* Shouldn't one of the following work?: */
//thefile.RelativePath("c:\\readme.txt");
//thefile.RelativePath = "c:\\readme.txt";

/* If I can set the RelativePath I can workaround the
problem, but I can't */

Jul 21 '05 #1
1 2144
Hi Rafael,

Thanks for posting in the group.

I noticed that you posted the question in some groups. I have replied it in
vsnet.general group. Please check my reply when you have free time. I will
follow up the post there.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "Rafael Campana" <raficampana@nospam_please.com>
!Sender: "Rafael Campana" <raficampana@nospam_please.com>
!Subject: VS 2002 vs. VS 2003 wizard problem
!Date: Mon, 22 Sep 2003 12:05:15 -0700
!Lines: 85
!Message-ID: <b1****************************@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcOBPHTVqBIu6PgYRNS994wRcp/0yQ==
!Newsgroups: microsoft.public.dotnet.general
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:109485
!NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
!X-Tomcat-NG: microsoft.public.dotnet.general
!
! Hi,
!
!I posted the messsage below last week, but no replies,
!I've reproduced the problem with a VB macro, just create
!one and paste the following code. Let me know of any
!workarounds you can think of.
!thanks,
! -R a f i
!
!' add reference to Microsoft.VisualStudio.VCProjectEngine
!Imports EnvDTE
!Imports Microsoft.VisualStudio.VCProjectEngine
!
!Public Module Module1
! Sub TestRelPath()
! Dim file As VCFile
! Dim col As IVCCollection
! Dim idx As Integer
! Dim prj As VCProject
! prj = DTE.Solution.Projects.Item(1).Object
! col = prj.files
!
! 'Add a file relative to the TEMP environment
!variable
! Dim foo As VCFile = prj.AddFile("$(TEMP)\foo.h")
! MsgBox(foo.FullPath)
!
! 'The following should return a path relative to
!the env var not .\
! MsgBox(foo.RelativePath)
! foo.RelativePath = "C:\Documents and
!Settings\bkretzler"
! MsgBox(foo.RelativePath)
!
! 'The following statement does not set the
!RelativePath
! foo.RelativePath = "$(TEMP)\foo.h"
! MsgBox(foo.RelativePath)
! End Sub
!End Module
!
!
!
!----------------------------------------------
!Subject: VS 2002 vs. VS 2003 wizard problem
!From: "Rafi" <ra*********@yahoo.com> Sent: 9/10/2003
!11:16:51 PM
!
!Hi,
!
!(not sure if this is the right newsgroup or not, please
!let me know)
!
!We've developed an add-in with wizards, etc for VS 2002,
!and worked without a problem. The changes has been made
!for it to work with VS 2003, but there's a roadblock that
!can't get around.
!The wizards adds some files to the project relative to an
!environment variable for example: "$(TEMP)\foo.c". This
!is shipping to customers and works great in VS 2002, now
!in VS 2003 it does not work, after the wizard (no code
!has changed) finishes, the relative path is ".\$(TEMP)
!\foo.c" which breaks everything. I was able to modify
!manually the .vcproj after it is created to be "$(TEMP)
!\foo.c" and work ok, but I'd like to handle that in the
!wizard, has anyone ran into this problem? any ideas,
!solutions?
!I've got a wizard that exhibits the problem, let me know
!if you want me to send it to you all, but below is a
!JScript snippet
!thanks,
!
!.....
!var thefile = srcFolder.AddFile(strFilePath);
!
!// This works - get RelativePath
!var filepathinfo = thefile.RelativePath;
!
!/* Shouldn't one of the following work?: */
!//thefile.RelativePath("c:\\readme.txt");
!//thefile.RelativePath = "c:\\readme.txt";
!
!/* If I can set the RelativePath I can workaround the
!problem, but I can't */
!
!

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rafi | last post by:
Hi, (not sure if this is the right newsgroup or not, please let me know) We've developed an add-in with wizards, etc for VS 2002, and worked without a problem. The changes has been made for...
0
by: Rafi | last post by:
Hi, (not sure if this is the right newsgroup or not, please let me know) We've developed an add-in with wizards, etc for VS 2002, and worked without a problem. The changes has been made for...
1
by: Rafael Campana | last post by:
Hi, I posted the messsage below last week, but no replies, I've reproduced the problem with a VB macro, just create one and paste the following code. Let me know of any workarounds you can...
0
by: Sebastian | last post by:
Hello I develop my applications in Access 2002. My development system is running Windows XP SP2 and I have Microsoft Office XP Developer. Microsoft Office XP is at SP3. I used Inno Setup (great...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.