Msbuild error msb1003

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. #1309 Comments Steps to reproduce the issue Create a default docker file created by visual studio 2019 for Linux container Add «RUN dotnet test» command (dot net CLI command to run all […]

Содержание

  1. MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. #1309
  2. Comments
  3. MSB1003: Specify a project or solution file #697
  4. Comments
  5. MSBUILD: ошибка MSB1003: укажите файл проекта или решения
  6. MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. #857
  7. Comments
  8. Footer
  9. Exception: MSBUILD : error MSB1003: Specify a project or solution file #399
  10. Comments

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. #1309

Steps to reproduce the issue

  1. Create a default docker file created by visual studio 2019 for Linux container
  2. Add «RUN dotnet test» command (dot net CLI command to run all unit tests inside docker container) in the docker file.
  3. Right-click on DockerFile and select «Build docker image» option in visual studio 2019
  4. Getting error — MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

**Below is the docker file — **

FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build
WORKDIR /src
COPY [«LinedataAnalytics/LinedataAnalytics.csproj», «LinedataAnalytics/»]
RUN dotnet restore «LinedataAnalytics/LinedataAnalytics.csproj»
COPY . .
WORKDIR «/src/LinedataAnalytics»
RUN dotnet build «LinedataAnalytics.csproj» -c Release -o /app

FROM build AS publish
RUN dotnet publish «LinedataAnalytics.csproj» -c Release -o /app

FROM base AS final
WORKDIR /app
COPY —from=publish /app .

WORKDIR /app
RUN dotnet test

The text was updated successfully, but these errors were encountered:

Источник

MSB1003: Specify a project or solution file #697

I followed the step-by-step in Azure Portal when creating a new Azure Function using VSC.

At the local debugging step when hitting F5, I get the following error:

Repro steps:
Follow the steps as detailed in the Azure Portal when creating a Function for the first time:

  • Install VCO extensions: Azure Functions and C#
  • Create a new function
  • Hit f5

Additional info (autogenerated):

The text was updated successfully, but these errors were encountered:

Sorry that you’re running into problems with the extension.

Did you create a Functions project before creating a new function? When creating a function, you’ll be prompted to select the folder that will contain the function. It seems like you don’t have a .csproj file should be generated when you press F5.

Thanks. Hope we’ll get you up and running soon!

Thanks for your reply @nturinski

If I go to the root of that folder and manually run dotnet clean and dotnet build it runs without errors:

@veuncent, the launch file seems good, but do you have this task.json?

I cloned your repo and recreated the project (via Create New Project ) whcih generated the appropriate tasks.json, settings.json, and launch.json.

I do have the task.json as well:

Here is a screenshot of my workspace:

We just released a new version of the Functions extension, v0.12.0. I tried to follow the «Create your first function using Visual Studio Code» tutorial using the new extension, I didn’t seem to run into the issue you were seeing. I couldn’t repro it either with the 0.11.0 release however. This is what I did. Let us know if your steps were different.

  1. start VS Code and select the Azure icon on the Activity bar. In Functions’ explorer, select the «folder» icon to create a new project. Select a location and folder to create the project. If you don’t have a folder already, create a new one in the «Select Folder» dialog.
  2. In the command palette, select C# for «Select a language for your function project»
  3. In the command palette, select Add to workspace for «Select how you would like to open your project». This step is missing in the tutorial. I’ve entered a bug to fix it.
  4. You might be prompted to resolve C# dependencies. Please click the Restore button to continue setting up the C# dependencies.
  5. In the Functions explorer, select the lightening icon to create a Function.
  6. In the command palette, chose your project folder created in step 1 above when asked for the project folder
  7. Select HttpTrigger for «Select a function template»
  8. Give a function name for «Provide a function name (Press ‘Enter’ to confirm or ‘Escape’ to cancel)
  9. Confirm for «Provide a namespace (Press ‘Enter’ to confirm or ‘Escape’ to cancel)
  10. AccessRights could be Anonymous (which was what I used)

You should be good to go with F5. Let us know if you still get any build error. Thanks.

I just hit the same issue using v0.12.0 that I just installed today. I was following along with the Create your first function using Visual Studio Code docs. The error was similar for both JavaScript and C# projects, and the command it runs for both seems to have a weird character I wasn’t expecting that could be causing the issue.

Here’s a section from the Task Terminal log after creating and trying to run a JS and then a C# Functions project.

As mentioned by @veuncent, if I run dotnet clean and dotnet build in a PowerShell Terminal window in VS Code, they both run successfully. I also successfully ran func host start from the Terminal window.

It may be a separate issue, but running the function that way doesn’t seem to find the default Function and the HTTP address/port it provided didn’t seem to work.

Источник

MSBUILD: ошибка MSB1003: укажите файл проекта или решения

Инструкции для примера приложения, которое я пытаюсь создать, так как я набираю

в командной строке.

Когда я это сделаю, я получаю следующую ошибку

Папка, в которой я выполняю команду, содержит файлы .cs, но не файлы .sln или .csproj.

Требуется ли .NetCore файл .csproj?

Код взят из ответа на мой вопрос здесь, но с тех пор проект github был удален.

Я попытался создать файл .csproj, но у меня возникли проблемы с предположением, какие пакеты в него поместить.

Я добавил следующий файл .csproj

Затем мне не хватает следующих пространств имен

Я знаю, как использовать диспетчер пакетов, но как мне определить правильные версии всего?

[Обновлять] Теперь я могу запустить dotnet restore, но dotnet run выдает ошибки

Инструменты -> Диспетчер пакетов Nuget -> Управление пакетами для решения сообщает об ошибке

Я сохранил все, закрыл файл .sln и снова открыл его. Затем я смог войти в диспетчер пакетов Nuget.

Я установил Microsoft.Azure.KeyVault (3.0.0) и Newtonsoft.Json (11.0.2) У меня проблемы с Microsoft.IdentityModel.Clients.ActiveDirectory Когда я попробовал Microsoft.IdentityModel, это был неправильный фреймворк.

[Обновлять] Погуглил «с использованием ядра Microsoft.IdentityModel.Clients.ActiveDirectory»

Найдено эта ссылка и побежал в личку

[Обновлять] Пытался поискать в Google Bouncy Castle с помощью оператора и нашел

Восстановить все успешно, теперь у меня ошибка времени выполнения в строке 47 из

var waitHandle = keyVaultObj.CreateSecretKeyValuePair (VaultName);

Содержит ли текущий рабочий каталог файл проекта или решения?

Из какого каталога вы запускаете эту команду?

Спасибо, обновил вопрос. В предоставленном мне коде нет файла .csproj или .sln.

Тогда это нужно сначала исправить .

Спасибо, я свяжусь с моим поставщиком.

Как вы создали этот проект? Поделитесь снимком экрана со структурой вашего проекта.

Спасибо, Эдвард, я обновил проект, чтобы показать.

Источник

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. #857

I am a novice, but I successfully submitted the first exercise. When I try to run a test for the second one «two-fer», I get the following error:

c:ProgramsExercism>dotnet test
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

I tried to move the content of c:UsersuserExercismcsharptwo-fer one level up, and it did not help. Now I am stuck. Please help.

The text was updated successfully, but these errors were encountered:

It seems as if you had run the dotnet test command from within exercism s installation directory. You need to run it from within the folder where exercism.exe has downloaded the exercise to.

Also please make sure to not move around the code. When submitting the CLI is very strict on the location of the code and you won’t be able to submit if the location does not match the CLIs expectations.

Thank you, NobbZ. It seems to be working now. Can I debug the code with Visual Studio though?

I do not use VS nor windows, but as far as I know you should be able to open the exercism dotnet projects in VS.

@exercism/csharp @exercism/fsharp @exercism/windows can you confirm?

What do you use? Yes, I confirm. Should I do it somewhere else.

I use Arch Linux and vscodium or emacs, depending on my moods 😉

And do I understand your confirmation correctly, that you actually tried to use VS and it just worked? And what do you want to do somewhere else?

It worked. Should I confirm the use of tags @exercism/csharp @exercism/fsharp @exercism/windows by clicking somewhere?

No, I was actually asking the members of the 3 mentioned teams if they can confirm whether or not Visual Studio should be able to open the dotnet related exercises without further config/manual intervention.

Oh, great. Yes, some more detailed instructions on all steps of using Excercism would be a good thing. But the brevity is fine also.

To use exercism? Personally I think everything is documented quite understandable and very verbose at times, I’d prefer a more slick set of istructions that does not do so much hand holding…

To use the actual toolstack of the track? Maybe, depends on the track…

And what I missed to say in the last point, if you feel that bits and pieces in the documentation are not clear or understandable enough, just open an issue at https://github.com/exercism/exercism and pinpoint the part of the documentation that could be improved and try to explain what you do not quite understand with that part.

It will be delegated from there to the proper sub-repository of the project if necessary.

Got it. Thank you.

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Exception: MSBUILD : error MSB1003: Specify a project or solution file #399

Here is my result for a test console application in netcoreapp1.1

The text was updated successfully, but these errors were encountered:

@gbolahanonamusi, thanks for the bug report. Could you provide a repro project? Which version of BenchmarkDotNet do you use?

We need your .csproj and Visual Studio verson

Exe netcoreapp1.1 win7-x86

Microsoft Visual Studio Community 2017
Version 15.0.26228.9 D15RTWSVC
Microsoft .NET Framework
Version 4.6.01586

Ok, so the first problem is that you want to test it for .NET Core, Classic and Mono, but your .csproj contains only netcoreapp1.1 in target framework.

Please change it to:
netcoreapp1.1;net45 and let me know the output

you want to test it for .NET Core, Classic and Mono, but your .csproj contains only netcoreapp1.1 in target framework.

@adamsitnik, could you automatically detect such situation and print a warning with useful instructions?

On net45 im getting this error

But same error on netcoreapp1.1

I recently encountered a similar issue using .NET Core 2 preview, Visual Studio 2017 15.3 preview 6 and BenchmarkDotNet 0.10.9.

I managed to track it down to the fact that during a previous run of BDN that was aborted, no cleanup was performed, so project.json files generated by BDN remained within the directory tree of the solution.
This made BDN think that I am using .json files for my projects, whereas I am using .csproj .

I looked at the source and saw how BDN determines whether we’re using .json or .csproj and I think it’s extremely brittle, since it relies on preview being present in the name of the runtime and recursively (!) scans the directory structure for project.json files.

I think that this solution is less than ideal, it took me quite a while to figure out what was going wrong. I propose two things to make it easier for people in the future:

  • During build indicate what the automatically detected toolchain was, optionally how BDN reached that conclusion.
  • Make the choice of toolchain something that needs to be explicitly configured while setting up the benchmark. I understand the need for easy setup and sane defaults in configuration, but I believe that is only a feasible route when we can determine the runtime with certainty.

Источник

Большая часть информации Baidu обрабатывается шаг за шагом в соответствии с подсказками. Мы можем запускать их шаг за шагом в соответствии с их руководствами. См. Как создать приложение ядра .net.https://www.cnblogs.com/jixiaosa/archive/2019/03/01/10457588.html, Но когда ты закончишь, Нани? ? ? ? ? ? ? Есть много маленьких вопросительных знаков? Если ваш каталог не является рабочим каталогом, ваш файл конфигурации необходимо сгенерировать вручную.

Код, созданный с использованием шаблона в vs code, не имеет имени файла с суффиксом .csproj, указанного во второй строке аргументов. Имя файла здесь необходимо вручную указать в соответствии с относительным адресом файла в рабочем каталоге. Не игнорируйте подсказки на английском языке, которые нужно вводить вручную.

 // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "command": "dotnet",
            "type": "shell",
            "args": [
                "build",
                // Ask dotnet build to generate full paths for file names.
                "MLTest/MLTest.csproj",
                "/property:GenerateFullPaths=true",
                // Do not generate summary otherwise it leads to duplicate errors in Problems panel
                "/consoleloggerparameters:NoSummary"
            ],
            "group": "build",
            "presentation": {
                "reveal": "silent"
            },
            "problemMatcher": "$msCompile"
        }
    ]

Затем продолжите запуск, и вы обнаружите, что операция прошла успешно, но файл dll не может быть найден, поэтому вот адрес шаблона, который необходимо изменить: ссылка: вот конфигурация: программа внутри — та что я модифицировал, нужно указать файл сборки каталога сборки. Параметр $ {workspace}, если вы не изменяете системные настройки, по умолчанию он указывает текущую самую внешнюю рабочую папку, поэтому честно введите адрес успешно сгенерированного файла выше для его успешного запуска.

{
    // Используйте IntelliSense для понимания связанных атрибутов. 
         // Наведите курсор, чтобы увидеть описания существующих свойств.
         // Для получения дополнительной информации посетите: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            "WARNING01": "*********************************************************************************",
            "WARNING02": "The C# extension was unable to automatically decode projects in the current",
            "WARNING03": "workspace to create a runnable launch.json file. A template launch.json file has",
            "WARNING04": "been created as a placeholder.",
            "WARNING05": "",
            "WARNING06": "If OmniSharp is currently unable to load your project, you can attempt to resolve",
            "WARNING07": "this by restoring any missing project dependencies (example: run 'dotnet restore')",
            "WARNING08": "and by fixing any reported errors from building the projects in your workspace.",
            "WARNING09": "If this allows OmniSharp to now load your project then --",
            "WARNING10": "  * Delete this file",
            "WARNING11": "  * Open the Visual Studio Code command palette (View->Command Palette)",
            "WARNING12": "  * run the command: '.NET: Generate Assets for Build and Debug'.",
            "WARNING13": "",
            "WARNING14": "If your project requires a more complex launch configuration, you may wish to delete",
            "WARNING15": "this configuration and pick a different template using the 'Add Configuration...'",
            "WARNING16": "button at the bottom of this file.",
            "WARNING17": "*********************************************************************************",
            "preLaunchTask": "build",
            "program": "${workspaceFolder}/MLTest/bin/Debug/netcoreapp3.0/MLTest.dll",
            "args": [],
            "cwd": "${workspaceFolder}",
            "console": "internalConsole",
            "stopAtEntry": false
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "${command:pickProcess}"
        }
    ]
}

Моя структура каталогов выглядит так: Для справки:

конечный результат:

  • Remove From My Forums
  • Question

  • User1489758560 posted

    Hello,

    I would to build the asp.net core solution from command line. for the .net framework, i use the below code which is in .bat file

    @Echo OFF
    Echo "Building solution/project file using batch file"
    SET PATH=C:WindowsMicrosoft.NETFrameworkv4.0.30319
    SET SolutionPath=D:TestSampleTestBuild.sln
    Echo Start Time - %Time%
    MSbuild %SolutionPath% /p:Configuration=Debug /p:Platform="Any CPU"
    Echo End Time - %Time%
    Set /p Wait=Build Process Completed...

    Like this, i would need to create one for building/Compiling the .net core solution from command line. please share me the sample code. 

Answers

  • User711641945 posted

    Hi born2win,

    all other projects are building properly and only two of them fails with the error message mentioned below.  i have tried to check the project file and i have proper version mentioned.

    Are you sure you use the same command line and only two projects do not work?Actually,when i use your command line it always make such error.It works well by using the following command:

    dotnet build D:TestSampleTestBuild.sln -f netcoreapp2.2
    

    Best Regards,

    Rena

    • Marked as answer by

      Thursday, October 7, 2021 12:00 AM

  • User475983607 posted

    The switch is 

    dotnet build -f netcoreapp2.2

    NOT

    dotnet build -f .netcoreapp2.2

    Why are you adding the dot?  All you have to do is follow the openly published documentation.  

    https://docs.microsoft.com/en-us/dotnet/standard/frameworks

    Lastly, if you issue leave the framework version off the build will use the project file framework version.  Have you tried…

    dotnet build

    … as recommend 3 times now?

    • Marked as answer by
      Anonymous
      Thursday, October 7, 2021 12:00 AM

error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. #440

Comments

AbhimanyuAryan commented Jan 21, 2017 •

I have dotnet core version 1.0.0-rc4-004597 installed. I have creating with dotnet commands

The text was updated successfully, but these errors were encountered:

Petermarcu commented Jan 21, 2017

@sayedihashimi , I’m guessing this is because the yoeman generators are still producing project.json based projects?

@AbhimanyuAryan , Can you try to run dotnet migrate ? That should convert project.json to GameReviewer.csproj and then you should be one step closer.

@piotrpMSFT , The yoeman templates that shipped in the past may be good test cases for dotnet migrate

AbhimanyuAryan commented Jan 21, 2017

Done. But how do I fix that for all new applications that I create. Do I need to run dotnet migrate everytime I create a dotnet app? @Petermarcu

Petermarcu commented Jan 21, 2017

You should be able to use dotnet new to create new projects. I don’t know the difference between whats supported there and what’s in yoeman but @sayedihashimi should be able to describe the difference and the plans for the yoeman generators.

Petermarcu commented Jan 21, 2017

You can also create a folder and in that folder run dotnet new -t Web , dotnet restore , dotnet run to create, build, and launch an MVC site.

Источник

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. #1309

Comments

sanjaykulkarni04 commented Sep 16, 2019

Steps to reproduce the issue

  1. Create a default docker file created by visual studio 2019 for Linux container
  2. Add «RUN dotnet test» command (dot net CLI command to run all unit tests inside docker container) in the docker file.
  3. Right-click on DockerFile and select «Build docker image» option in visual studio 2019
  4. Getting error — MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

**Below is the docker file — **

FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build
WORKDIR /src
COPY [«LinedataAnalytics/LinedataAnalytics.csproj», «LinedataAnalytics/»]
RUN dotnet restore «LinedataAnalytics/LinedataAnalytics.csproj»
COPY . .
WORKDIR «/src/LinedataAnalytics»
RUN dotnet build «LinedataAnalytics.csproj» -c Release -o /app

FROM build AS publish
RUN dotnet publish «LinedataAnalytics.csproj» -c Release -o /app

FROM base AS final
WORKDIR /app
COPY —from=publish /app .

WORKDIR /app
RUN dotnet test

The text was updated successfully, but these errors were encountered:

Источник

MSB1003: Specify a project or solution file #697

Comments

veuncent commented Oct 7, 2018

I followed the step-by-step in Azure Portal when creating a new Azure Function using VSC.

At the local debugging step when hitting F5, I get the following error:

Repro steps:
Follow the steps as detailed in the Azure Portal when creating a Function for the first time:

  • Install VCO extensions: Azure Functions and C#
  • Create a new function
  • Hit f5

Additional info (autogenerated):

The text was updated successfully, but these errors were encountered:

nturinski commented Oct 8, 2018

Sorry that you’re running into problems with the extension.

Did you create a Functions project before creating a new function? When creating a function, you’ll be prompted to select the folder that will contain the function. It seems like you don’t have a .csproj file should be generated when you press F5.

Thanks. Hope we’ll get you up and running soon!

veuncent commented Oct 10, 2018

Thanks for your reply @nturinski

If I go to the root of that folder and manually run dotnet clean and dotnet build it runs without errors:

veuncent commented Oct 10, 2018

nturinski commented Oct 10, 2018

@veuncent, the launch file seems good, but do you have this task.json?

I cloned your repo and recreated the project (via Create New Project ) whcih generated the appropriate tasks.json, settings.json, and launch.json.

veuncent commented Oct 11, 2018

I do have the task.json as well:

Here is a screenshot of my workspace:

jinglouMSFT commented Oct 23, 2018

We just released a new version of the Functions extension, v0.12.0. I tried to follow the «Create your first function using Visual Studio Code» tutorial using the new extension, I didn’t seem to run into the issue you were seeing. I couldn’t repro it either with the 0.11.0 release however. This is what I did. Let us know if your steps were different.

  1. start VS Code and select the Azure icon on the Activity bar. In Functions’ explorer, select the «folder» icon to create a new project. Select a location and folder to create the project. If you don’t have a folder already, create a new one in the «Select Folder» dialog.
  2. In the command palette, select C# for «Select a language for your function project»
  3. In the command palette, select Add to workspace for «Select how you would like to open your project». This step is missing in the tutorial. I’ve entered a bug to fix it.
  4. You might be prompted to resolve C# dependencies. Please click the Restore button to continue setting up the C# dependencies.
  5. In the Functions explorer, select the lightening icon to create a Function.
  6. In the command palette, chose your project folder created in step 1 above when asked for the project folder
  7. Select HttpTrigger for «Select a function template»
  8. Give a function name for «Provide a function name (Press ‘Enter’ to confirm or ‘Escape’ to cancel)
  9. Confirm for «Provide a namespace (Press ‘Enter’ to confirm or ‘Escape’ to cancel)
  10. AccessRights could be Anonymous (which was what I used)

You should be good to go with F5. Let us know if you still get any build error. Thanks.

patridge commented Nov 1, 2018

I just hit the same issue using v0.12.0 that I just installed today. I was following along with the Create your first function using Visual Studio Code docs. The error was similar for both JavaScript and C# projects, and the command it runs for both seems to have a weird character I wasn’t expecting that could be causing the issue.

Here’s a section from the Task Terminal log after creating and trying to run a JS and then a C# Functions project.

As mentioned by @veuncent, if I run dotnet clean and dotnet build in a PowerShell Terminal window in VS Code, they both run successfully. I also successfully ran func host start from the Terminal window.

It may be a separate issue, but running the function that way doesn’t seem to find the default Function and the HTTP address/port it provided didn’t seem to work.

Источник

MSBUILD: ошибка MSB1003: укажите файл проекта или решения

Инструкции для примера приложения, которое я пытаюсь создать, так как я набираю

в командной строке.

Когда я это сделаю, я получаю следующую ошибку

Папка, в которой я выполняю команду, содержит файлы .cs, но не файлы .sln или .csproj.

Требуется ли .NetCore файл .csproj?

Код взят из ответа на мой вопрос здесь, но с тех пор проект github был удален.

Я попытался создать файл .csproj, но у меня возникли проблемы с предположением, какие пакеты в него поместить.

Я добавил следующий файл .csproj

Затем мне не хватает следующих пространств имен

Я знаю, как использовать диспетчер пакетов, но как мне определить правильные версии всего?

[Обновлять] Теперь я могу запустить dotnet restore, но dotnet run выдает ошибки

Инструменты -> Диспетчер пакетов Nuget -> Управление пакетами для решения сообщает об ошибке

Я сохранил все, закрыл файл .sln и снова открыл его. Затем я смог войти в диспетчер пакетов Nuget.

Я установил Microsoft.Azure.KeyVault (3.0.0) и Newtonsoft.Json (11.0.2) У меня проблемы с Microsoft.IdentityModel.Clients.ActiveDirectory Когда я попробовал Microsoft.IdentityModel, это был неправильный фреймворк.

[Обновлять] Погуглил «с использованием ядра Microsoft.IdentityModel.Clients.ActiveDirectory»

Найдено эта ссылка и побежал в личку

[Обновлять] Пытался поискать в Google Bouncy Castle с помощью оператора и нашел

Восстановить все успешно, теперь у меня ошибка времени выполнения в строке 47 из

var waitHandle = keyVaultObj.CreateSecretKeyValuePair (VaultName);

Содержит ли текущий рабочий каталог файл проекта или решения?

Из какого каталога вы запускаете эту команду?

Спасибо, обновил вопрос. В предоставленном мне коде нет файла .csproj или .sln.

Тогда это нужно сначала исправить .

Спасибо, я свяжусь с моим поставщиком.

Как вы создали этот проект? Поделитесь снимком экрана со структурой вашего проекта.

Спасибо, Эдвард, я обновил проект, чтобы показать.

Источник

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. #857

Comments

Kosarar commented Jun 20, 2019

I am a novice, but I successfully submitted the first exercise. When I try to run a test for the second one «two-fer», I get the following error:

c:ProgramsExercism>dotnet test
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

I tried to move the content of c:UsersuserExercismcsharptwo-fer one level up, and it did not help. Now I am stuck. Please help.

The text was updated successfully, but these errors were encountered:

NobbZ commented Jun 20, 2019

It seems as if you had run the dotnet test command from within exercism s installation directory. You need to run it from within the folder where exercism.exe has downloaded the exercise to.

Also please make sure to not move around the code. When submitting the CLI is very strict on the location of the code and you won’t be able to submit if the location does not match the CLIs expectations.

Kosarar commented Jun 20, 2019

Thank you, NobbZ. It seems to be working now. Can I debug the code with Visual Studio though?

NobbZ commented Jun 20, 2019

I do not use VS nor windows, but as far as I know you should be able to open the exercism dotnet projects in VS.

@exercism/csharp @exercism/fsharp @exercism/windows can you confirm?

Kosarar commented Jun 20, 2019

What do you use? Yes, I confirm. Should I do it somewhere else.

NobbZ commented Jun 20, 2019

I use Arch Linux and vscodium or emacs, depending on my moods 😉

And do I understand your confirmation correctly, that you actually tried to use VS and it just worked? And what do you want to do somewhere else?

Kosarar commented Jun 20, 2019

It worked. Should I confirm the use of tags @exercism/csharp @exercism/fsharp @exercism/windows by clicking somewhere?

NobbZ commented Jun 20, 2019

No, I was actually asking the members of the 3 mentioned teams if they can confirm whether or not Visual Studio should be able to open the dotnet related exercises without further config/manual intervention.

Kosarar commented Jun 20, 2019

Oh, great. Yes, some more detailed instructions on all steps of using Excercism would be a good thing. But the brevity is fine also.

NobbZ commented Jun 20, 2019

To use exercism? Personally I think everything is documented quite understandable and very verbose at times, I’d prefer a more slick set of istructions that does not do so much hand holding…

To use the actual toolstack of the track? Maybe, depends on the track…

NobbZ commented Jun 20, 2019

And what I missed to say in the last point, if you feel that bits and pieces in the documentation are not clear or understandable enough, just open an issue at https://github.com/exercism/exercism and pinpoint the part of the documentation that could be improved and try to explain what you do not quite understand with that part.

It will be delegated from there to the proper sub-repository of the project if necessary.

Kosarar commented Jun 20, 2019

Got it. Thank you.

Footer

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

  • Remove From My Forums
  • Question

  •  Hi,

    I am executing the below statement in CMD

    MSBuild.exe -ArgumentList «»C:Program Files (x86)xyz for BizTalk 1.0.0DeploymentDeployment.btdfproj»» /p:DeployBizTalkMgmtDB=True;Configuration=Server;InstallDir=»C:Program Files (x86)xyz for BizTalk 1.0.0″ /target:Undeploy/l:FileLogger,Microsoft.Build.Engine;logfile=»FileLogger,Microsoft.Build.Engine;logfile=»C:Program
    Files (x86)xyz for BizTalk 1.0.0DeployResultsDeployResults.txt»»

    i get the below Error 

    MSBUild :Error MSB1001: Unknown Switch

    Switch-Argument List

    Is there any document which will help me Understand BTDF with MSBuild?

    Can you Please help me with this?

    Thanks,

    Sujith.

Answers

  • MSBuild.exe -ArgumentList «»C:Program Files (x86)xyz for BizTalk 1.0.0DeploymentDeployment.btdfproj»» /p:DeployBizTalkMgmtDB=True;Configuration=Server;InstallDir=»C:Program Files (x86)xyz for BizTalk 1.0.0″
    /target:Undeploy/l:FileLogger,Microsoft.Build.Engine;logfile=»FileLogger,Microsoft.Build.Engine;logfile=»C:Program Files (x86)xyz for BizTalk 1.0.0DeployResultsDeployResults.txt»»

    You get the error for above bold  because ther is no switch called «ArgumentList» in the mSbuild reference for that effect.

    Refer
    MSBuild Error MSB1001 and
    MSBuild Command-Line Reference

    What you should try is as follows

    MSBuild.exe "C:Program Files (x86)xyz for BizTalk 1.0.0DeploymentDeployment.btdfproj" /p:DeployBizTalkMgmtDB=True;Configuration=Server;InstallDir="C:Program Files (x86)xyz for BizTalk 1.0.0" /target:Undeploy /l:FileLogger,Microsoft.Build.Engine;logfile="FileLogger,Microsoft.Build.Engine;logfile="C:Program Files (x86)xyz for BizTalk 1.0.0DeployResultsDeployResults.txt"

    Regards,


    Mandar Dharmadhikari

    • Edited by

      Friday, October 7, 2016 3:55 AM
      Info

    • Proposed as answer by
      Rachit SikroriaModerator
      Saturday, October 15, 2016 4:39 AM
    • Marked as answer by
      Rachit SikroriaModerator
      Saturday, October 15, 2016 4:49 AM

  • Hi Sujith,

    Invoking BTDF using command line involves multiple steps like:

    • Building/packaging the BizTalk application into an MSI.
    • Install the msi
    • Export the environment-specific settings XML files from the SettingsFileGenerator.xml
    • Deploying the msi with the exported environment-specific
      binding file.

    Following commands shall able to achive the above steps from command-line:

    Building/packaging
    the BizTalk application into an MSI
    :

    "<MSBuildPath>MSBuild.exe" /p:<solutionConfiguration> /t:Installer "<pathToBTDFProj>"

    For example:

    «C:WindowsMicrosoft.NETFrameworkV4.0.30319MSBuild.exe» /p:Configuration=Release /t:Installer «C:TFSMyBizTalkAppDeploymentDeployment.btdfproj»

    Install the msi:

    You can install the MSI using the Windows Installer command-line tool msiexec.exe:

    msiexec.exe /i MyBizTalkApp.msi /passive /log MyBizTalkAppInstall.log INSTALLDIR="C:Program FilesMyBizTalkApp1.0"

    Export
    the environment-specific settings XML files from the
    SettingsFileGenerator.xml:

    «C:Program FilesMyBizTalkApp1.0DeploymentFrameworkDeployToolsEnvironmentSettingsExporter.exe»
    «C:Program FilesMyBizTalkApp1.0DeploymentEnvironmentSettingsSettingsFileGenerator.xml» «C:Program FilesMyBizTalkApp1.0DeploymentEnvironmentSettings»

    Deploying
    the msi with the exported 
    environment-specific
    binding file
    :

    «%windir%Microsoft.NETFrameworkv4.0.30319MSBuild.exe» /p:DeployBizTalkMgmtDB=true;Configuration=Server;SkipUndeploy=true
    /target:Deploy /l:FileLogger,Microsoft.Build.Engine;logfile=»C:Program FilesMyBizTalkApp1.0DeployResultsDeployResults.txt» «C:Program FilesMyBizTalkApp1.0DeploymentMyBizTalkApp.btdfproj» /p:ENV_SETTINGS=»C:Program FilesMyBizTalkApp1.0DeploymentEnvironmentSettingsExported_ProdSettings.xml»

    Reference:

    Packaging
    an Application for Deployment

    Deploying
    an Application via Script


    Rachit Sikroria (Microsoft Azure MVP)

    • Proposed as answer by
      Rachit SikroriaModerator
      Saturday, October 15, 2016 4:39 AM
    • Marked as answer by
      Rachit SikroriaModerator
      Saturday, October 15, 2016 4:49 AM

Понравилась статья? Поделить с друзьями:
  • Msbuild error msb1001 unknown switch
  • Msb3644 как исправить
  • Msasn1 dll ошибка
  • Mssql raise error
  • Msado15 dll как исправить ошибку