1

I am editing a project written by someone else. The issue is that there seems to a hidden build event. The event is copying a ini file to my c:/ drive. But the build gives the following error: "Unable to copy fille to access to is denied. I have looked and there is no pre-build event in the project, so I'm at a loss for why it is trying to create the file in the first place. I could remove the permissions on the folder and just let it copy the file, but I would rather know where Visual Studio is being told to copy the file in the first place.

Any insight would be greatly appreciated.

Edit

So this is in the vbproj:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <OutputPath>..\..\..\..\..\..\..\..\ProgramData\Autodesk\ApplicationPlugins\Tools.bundle\Contents\</OutputPath>
    <DocumentationFile>
    </DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>

Can I edit that in notepad? Seems like I should be able to delete it somewhere.

akb
  • 43
  • 7
  • Do not just give permissions to the root of your C:\ drive. It requires admin permissions for a reason, and by opening up permissions (especially when you're not sure why) you're creating a security hole that can be exploited. – Ken White Jun 30 '16 at 18:16
  • My original thinking about project files was that they described where to find things and that was all. I now understand that they are basically the instructions on how to _make_ the project, and thus are as important as any other source file in the system and need to be understood as a programming language in their own right. It's a shame they're not easier to get at from VS. – Richard Petheram Jul 01 '16 at 08:15

1 Answers1

0

There are a number of ways to run external programs during build, pre-build is just the easiest to get at. My suggestion is that you open the project file itself (.csproj or whatever you're using), either using a text editor (I use Notepad++ for this), or by unloading the project inside VS from the Solution Explorer context menu and editing it in-situ. Search through the XML looking for words like ini, build or copy and see what pops up.

Richard Petheram
  • 805
  • 12
  • 16
  • Thanks for the response. I see the output path now. I'll post the property group. Can I edit that in notepad++? – akb Jun 30 '16 at 19:31
  • So I changed theOutputPath to ..\..\bin\debug in notepad++ and viola it built. I'm not sure what the issue was, since I checked the output path in visual studio and it was pointed to the debug folder. At any rate, thanks for your help! – akb Jun 30 '16 at 19:55