Click here to Skip to main content
13,089,536 members (71,345 online)
Rate this:
Please Sign up or sign in to vote.
Hello everyone! I'm making an add-in for Visual Studio 2012 and my add-in is almost finished but I got stuck in a small section. So my add-in basically creates a resource file and adds it to the project. I used ResXResourceWriter to make the resource file and then I used the DTE object to add the resource file to the project.

Here's where I'm stuck: I want to add the resource file to the project but in a specific folder which is the App_LocalResources folder. My add-in does add the file to the project but not in that folder. Is there a way to do this?
Posted 3-Jul-13 20:16pm
praks_1 4-Jul-13 3:13am
you can use :
PostBuild events of project
Cardslash 4-Jul-13 10:16am
that doesn't work

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There are several ways to do this. What I describe is how I do that kind of thing.

Exit Visual Studio and edit the xx.csxproj file with a non-VS editor (eg. Notepad). Find the file reference in the code and simply add any extra directory structure to the filespec. Be careful to double up backslashes ("\\") where required. You can change relative directory names to absolute if you like. Don't forget to do this for all configurations (eg. Debug, Release, ...).

[disclaimer: I do this type of thing frequently for C++ project files; hopefully I have translated this correctly into C# lingo.]

[Update 1]
Create the resource file first, in the location of your choice. Add the file to the project. Depending on where the file/folder exists, VS will make either a relative or absolute reference to it.
Cardslash 5-Jul-13 2:17am
Here's the thing: I want my add-in to do all the job here. I don't want to edit some files to get the correct output.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 5 Jul 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100