Error msb3191 не удается создать каталог

Hi everybody!
  • Remove From My Forums
  • Question

  • Hi everybody!

    I’ve been trying to compile a project I have but I keep on receiving «error MSB3191 Unable to create directory «D:MC55release». Could not find a part of the path ‘D:MC55release». I do not have a D drive nor do I know where this error
    is coming from.

    I checked the project properties as well as the code itself and nowhere is it specified to look for the D Drive. I also checked the Macros in the project properties and found nothing similar to that.

    This project had been compiled in the past using VS 6 but now I’m using VS 2013.

    The error points to this : «<MakeDir Directories=»@(LinkDirsToMake)» /> » which is situated in the file Microsoft.CPP.Build.Targets.

    I tried changing some things in the code and properties but nothing worked. Anybody have any ideas why this is happening?

    If any other information is needed from me just let me know!

    Thanks a lot! :-)

Answers

  • I figured out where the problem was.

    I was checking the «Output Directory» in the project properties under «General» and it was pointing to the correct place. I later checked the «Output File» in the Linker tab and the problem was there!

    Thanks for everything! :-)

    • Marked as answer by

      Wednesday, March 26, 2014 1:48 AM

I develop DLL project in native C++ under VS2013 Professional, Win7 64b Enterprise.

The project has 4 configurations as one can see from the snippet below.

At some stage, I added to the project’s properties the post-build step as follows:

copy "$(ProjectDir)$(TargetName).ini" "$(TargetDir)*.*"

The project was successfully built and the .ini file was copied as expected. But following error were reported:

Error 1  error MSB3191: Unable to create directory "D:MESMULTICHANNELMULTITHREADIOMIOM.ini D:MESMULTICHANNELMULTITHREADx64Release". The given path's format is not supported.
C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V120Microsoft.CppBuild.targets
1228 5  IOM
Error 2  error MSB3191: Unable to create directory "D:MESMULTICHANNELMULTITHREADIOMIOM.ini D:MESMULTICHANNELMULTITHREADRelease". The given path's format is not supported.
C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V120Microsoft.CppBuild.targets
1228 5  IOM
Error 3  error MSB3191: Unable to create directory "D:MESMULTICHANNELMULTITHREADIOMIOM.ini D:MESMULTICHANNELMULTITHREADx64Debug". The given path's format is not supported.
C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V120Microsoft.CppBuild.targets
1228 5  IOM
Error 4  error MSB3191: Unable to create directory "D:MESMULTICHANNELMULTITHREADIOMIOM.ini D:MESMULTICHANNELMULTITHREADDebug". The given path's format is not supported.
C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V120Microsoft.CppBuild.targets
1228 5  IOM

What’s going here?

Thank you in advance,

asked Feb 1, 2017 at 15:59

Lion Butcher's user avatar

The right solution was to define in the post-build step as follows:

copy $(ProjectDir)$(TargetName).ini $(TargetDir)*.*

that is, to omit all the quotation marks ".

cbuchart's user avatar

cbuchart

10.5k7 gold badges53 silver badges87 bronze badges

answered Feb 5, 2017 at 7:15

Lion Butcher's user avatar

  • Remove From My Forums
  • Question

  • I’m running MSBuild in my build machine using CruiseControl.NET.
    On that machine I don’t have nor VS2005, and WebAppProject.

    I got it run copying the .target file but then, when the MSBuild file compiles the my web application project I get an error:

    C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Microsoft.Common.targets(750,9):
    error MSB3191: Unable to create directory «bin». Cannot create «E:CCNET-ProjectsworkingFolderSubtextSubtextSolutionSubtext.Webbin» because a file or directory with the same name already exists.

    What my build file does is get a clean copy of the solution (removes all bin and obj folders) and then start the build in my solution file.
    The problem is that the web app tasks, as soon as they start, create a bin file (not a folder), so when the build process starts, it already find a «bin» thing, giving the error I reported above.

    Any idea on how to solve this?

Answers

  • Simone,

    I don’t know how to solve this, sorry. Please open a bug following the instructions at the top of this forum.

    Dan

  • Remove From My Forums
  • Question

  • I’m running MSBuild in my build machine using CruiseControl.NET.
    On that machine I don’t have nor VS2005, and WebAppProject.

    I got it run copying the .target file but then, when the MSBuild file compiles the my web application project I get an error:

    C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Microsoft.Common.targets(750,9):
    error MSB3191: Unable to create directory «bin». Cannot create «E:CCNET-ProjectsworkingFolderSubtextSubtextSolutionSubtext.Webbin» because a file or directory with the same name already exists.

    What my build file does is get a clean copy of the solution (removes all bin and obj folders) and then start the build in my solution file.
    The problem is that the web app tasks, as soon as they start, create a bin file (not a folder), so when the build process starts, it already find a «bin» thing, giving the error I reported above.

    Any idea on how to solve this?

Answers

  • Simone,

    I don’t know how to solve this, sorry. Please open a bug following the instructions at the top of this forum.

    Dan

Я использую CUDA 6.5 на Visual Studio 2013 x64.

У меня есть проект статической библиотеки VC ++ с именем MyLib, который связан с исполняемым проектом консоли MyClient x64. Я добавил настройку сборки CUDA 6.5 в оба проекта. Кроме того, я захожу в Свойства конфигурации -> CUDA C / C ++ и установил «Целевую машинную платформу» как 64-битную для этих двух проектов, так как хочу скомпилировать их для платформы x64.

Я добавил файлы MyCUDACode.cpp и MyCUDACode.h в проект MyLib и пометил их тип элемента как CUDA C / C ++ вместо oc C / C ++ компилятор. MyCUDACode.cpp имеет ряд функций, которые вызывают функции API CUDA. Кроме того, MyCUDACode.h ссылается на файлы cuda.h и cuda_runtime.h.

MyClient связан с MyLib. Теперь я получаю две ошибки компиляции:

  • Первая ошибка в компиляции MyLib, которая говорит, что Невозможно создать каталог
  • Во-вторых, я получаю неразрешенные внешние ошибки символов при связывании
    MyClient с MyLib. Вот вывод журнала:

    —— Начата сборка: Проект: MyLib, Конфигурация: Выпуск x64 ——
    1> C: Program Files (x86) MSBuild Microsoft.Cpp v4.0 V120 BuildCustomizations CUDA 6.5.targets (412,9): ошибка MSB3191: невозможно создать каталог «x64 Release D: GitHub SRC хелперы ». Формат данного пути не поддерживается.

    2> —— Началась сборка: Проект: MyClient, Конфигурация: Выпуск x64 ——
    2> MyLib.lib (MyCUDACode.obj): ошибка LNK2001: неразрешенный внешний символ cudaGetDeviceCount

    2> MyLib.lib (MyCUDACode.obj): ошибка LNK2001: неразрешенный внешний символ cudaDeviceCanAccessPeer

    2> MyLib.lib (MyCUDACode.obj): ошибка LNK2001: неразрешенный внешний символ cudaGetDeviceProperties

    2> MyLib.lib (MyCUDACode.obj): ошибка LNK2001: неразрешенный внешний символ cudaSetDevice

    2> MyLib.lib (MyCUDACode.obj): ошибка LNK2001: неразрешенный внешний символ cudaDeviceDisablePeerAccess

    2> MyLib.lib (MyCUDACode.obj): ошибка LNK2001: неразрешенный внешний символ cudaDeviceReset

    2> MyLib.lib (MyCUDACode.obj): ошибка LNK2001: неразрешенный внешний символ cudaDeviceEnablePeerAccess

    2> C: … visual studio 2013 Projects Prj x64 Release MyClient.exe: фатальная ошибка LNK1120: 7 неразрешенных внешних проблем

Я пробовал оба режима выпуска и отладки, но я получаю ту же ошибку.

0

Решение

Я просто воспроизвожу шаги по устранению ошибок:

  • Чтобы устранить ошибку (временное решение): MSB3191: Невозможно создать каталог. Формат указанного пути не поддерживается., Просто скопируйте Cuda cu и cuh файлы в папку проекта Visual Studio.
  • [ОБНОВИТЬ]: Недавно я нашел лучшее решение для этой проблемы MSB3191: Невозможно создать каталог. Формат указанного пути не поддерживается.. Это исправление работает без необходимости перемещения файлов cu в папку проекта VS. Для этого откройте файл «C: Program Files (x86) MSBuild Microsoft.Cpp v4.0 V120 BuildCustomizations CUDA 6.5.targets», и перейдите на линию обидчика (в данном случае 412). Эта строка содержит следующий раздел xml:

    <MakeDir
    Condition="'%(CudaCompile.ExcludedFromBuild)' != 'true'"Directories="%(CudaCompile.DepsOutputDir)" />
    

    Как вы можете видеть, это своего рода директива, которая указывает системе сборки создать папку для компилируемых файлов cuda. Для имени папки используется свойство CudaCompile.DepsOutputDir. Теперь откройте файл: «C: Program Files (x86) MSBuild Microsoft.Cpp v4.0 V120 BuildCustomizations CUDA 6.5.props». Этот реквизитный файл определяет значения свойств, используемых в целевом файле. Теперь поиск по слову DepsOutputDirв этом файле реквизита. Есть только раздел XML, который определяет и ссылается на это ключевое слово:

        <!-- Miscellaneous -->
    <DepsOutputFile>%(Filename)%(Extension).deps</DepsOutputFile>
    <DepsOutputDir>$(IntDir)%(RelativeDir)</DepsOutputDir>
    <DepsOutputPath>%(DepsOutputDir)%(DepsOutputFile)</DepsOutputPath>
    

    Теперь, чтобы окончательно исправить проблему MSB3191, просто удалите переменную % (RelativeDir) сверху раздел xml и сохраните файл props (для этого потребуются права администратора)

  • Чтобы устранить ошибку: LNK2001: неразрешенный внешний символ, следовать Настройки для линкера раздел в этом сообщение

4

Другие решения

  • Forum
  • General C++ Programming
  • Building error in visual studio

Building error in visual studio

I am a beginner/intermediate programmer and am getting this error when I try to build my code :

 
C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVCVCTargetsMicrosoft.CppBuild.targets(877,5): error MSB3191: 

Unable to create directory "C:Program Files (x86)visual projectsglowingglowingglowDebugC:Program Files (x86)Microsoft DirectX SDK (June 2010)LIB". The given path's format is not supported.

I have tried many different solutions, and nothing has changed the output.
Please help!

Last edited on

A colon is not valid in a path name except as the second character in the leading drive designation (as in «C:»).

I’m not sure how you got the DirectX SDK path appended to your program’s debug path. The simplest fix might be to just create a new project, then copy the file(s) you created into the new project.

Hope this helps.

@Duthomhas
thanks for the suggestion
just created a new project, added all of my headers and source to it and pushed build and got the same error :

1>C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVCVCTargetsMicrosoft.CppBuild.targets(877,5): error MSB3191: Unable to create directory "C:UsersLuke's computersourcereposProject6Project6DebugC:Program Files (x86)Microsoft DirectX SDK (June 2010)LIB". The given path's format is not supported.

please if anybody has anymore suggestions I am willing to do anything (not harmful to my os)

Last edited on

Does it compile in «Release» mode?

What looks strange to me is:

1
2
...Project6Project6DebugC:Program Files...
                           ^^^

@jlb
Yes, that is exactly the problem. The trick is to narrow down where the error is coming from.

thank you so much everybody.
narrowed down the problem — my browse information file directory was not separated with a ;
$(IntDir);$(DXSDK_DIR)LIBx86 is how it is now and it works fine.
the only problem is that it doesn’t apply to every project automatically so if anybody can help me with that please. I started on code::blocks but ran into problems there so I moved to VS. don’t quite know the layout

Since VS 2010 MS has moved global project options in an effort to keep people from abusing them. (It has been a known problem with corporate build environments.)

From the IDE View menu, select Property Manager.
This produces a new tab along the bottom of the Solution Explorer (the leftmost pane).

Open any C or C++ project.
(You must have an open project to access the global options. The project itself will not be otherwise modified.)

Now in the Property Manager you have a list of Build Types.
Choose your “Debug | Win32” or “Debug | x64” (whichever one you are trying to compile).
The very first item will be the global properties sheet XML, named something like “

Microsoft.Cpp.~.user

”.
Right click and select Properties.

You should see the familiar properties dialog. Fix directories there. Apply.

Topic archived. No new replies allowed.

  • Remove From My Forums
  • Вопрос

  • I created a SharePoint WebPart in Visual Studio 2005. The WebPart was added to the test SharePoint server, and it worked.  Now the test SharePoint server is no longer existed.  When I rebuild the WebPart from Visual Studio, I got an error « C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Microsoft.Common.targets(750,9): error MSB3191: Unable to create directory «\SPC$InetpubwwwrootwssVirtualDirectories80bin». The network path was not found.«  The test SharePoint server is «\sp».  Line 750 was “<MakeDir Directories=«$(OutDir);$(IntermediateOutputPath);@(DocFileItem->’%(RelativeDir)’)«/>”. It seemed the «\sp“ was passed into the $(OutDir).  I couldn’t find where the values of $(OutDir) and $(IntermediateOutputPath) were passed in. Any ideas.

    Thanks.
    DanYeung

Понравилась статья? Поделить с друзьями:
  • Error msb3073 ue4
  • Error msb3073 the command setlocal
  • Error msb3073 the command npm run build exited with code 1
  • Error msb3073 the command npm install exited with code 127
  • Error msb3073 cmake