473,396 Members | 1,783 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,396 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 2146
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.