Azure Devops build fails Warning MSB3245: Could not resolve this reference
up vote
1
down vote
favorite
I'm trying to create a pipeline in Azure DevOps and I get compilation errors caused by a missing reference:
[warning]C:Program Files (x86)Microsoft Visual
Studio2017EnterpriseMSBuild15.0BinMicrosoft.Common.CurrentVersion.targets(2110,5):
Warning MSB3245: Could not resolve this reference. Could not locate
the assembly "ABC". Check to make sure the assembly exists on disk. If
this reference is required by your code, you may get compilation
errors.
I have a VS2017 solution with 2 projects.
ABC which is the actual application
ABC.UnitTests where I added some unit tests (I'm using MSTest)
When I build the solution locally, I'm able to do a successful build with the following steps:
Build ABC project => ABC.dll is generated
Add reference in ABC.UnitTests proj to ABC.dll
Build the entire solution => build successful
The .cs file in ABC.UnitTests references the application in this way, and generates the warning above:
using ABC;
If I do a clean build where ABC.dll is deleted and then I do a build of the entire solution I get the same MSB3245 warning. So the issue is reproducible locally if the dll does not exist.
Then, when I upload the solution to Azure DevOps, I do the following steps.
- Upload the solution from local VS2017 and a project is created in Azure
- Build the project in Azure DevOps => reference issue reported
I have a YAML config file with name azure-pipelines.yml which references the hosted 2017 agent.
pool: vmImage: 'vs2017-win2016'
Alternate flow:
- Upload the solution from local VS2017 and a project is created in Azure
- Comment out the reference to ABC.UnitTests project from the sln file
- Create the pipeline => build successful.
visual-studio azure visual-studio-2017 azure-devops
add a comment |
up vote
1
down vote
favorite
I'm trying to create a pipeline in Azure DevOps and I get compilation errors caused by a missing reference:
[warning]C:Program Files (x86)Microsoft Visual
Studio2017EnterpriseMSBuild15.0BinMicrosoft.Common.CurrentVersion.targets(2110,5):
Warning MSB3245: Could not resolve this reference. Could not locate
the assembly "ABC". Check to make sure the assembly exists on disk. If
this reference is required by your code, you may get compilation
errors.
I have a VS2017 solution with 2 projects.
ABC which is the actual application
ABC.UnitTests where I added some unit tests (I'm using MSTest)
When I build the solution locally, I'm able to do a successful build with the following steps:
Build ABC project => ABC.dll is generated
Add reference in ABC.UnitTests proj to ABC.dll
Build the entire solution => build successful
The .cs file in ABC.UnitTests references the application in this way, and generates the warning above:
using ABC;
If I do a clean build where ABC.dll is deleted and then I do a build of the entire solution I get the same MSB3245 warning. So the issue is reproducible locally if the dll does not exist.
Then, when I upload the solution to Azure DevOps, I do the following steps.
- Upload the solution from local VS2017 and a project is created in Azure
- Build the project in Azure DevOps => reference issue reported
I have a YAML config file with name azure-pipelines.yml which references the hosted 2017 agent.
pool: vmImage: 'vs2017-win2016'
Alternate flow:
- Upload the solution from local VS2017 and a project is created in Azure
- Comment out the reference to ABC.UnitTests project from the sln file
- Create the pipeline => build successful.
visual-studio azure visual-studio-2017 azure-devops
this is how I reference the main project in the .csproj of the MSTest proj <ItemGroup> <Reference Include="ABC"> <HintPath>..ABCbinDebugnetcoreapp2.1ABC.dll</HintPath> </Reference> </ItemGroup>
– Cosmin
Nov 10 at 20:48
1
you should not refer the DLL like this. Instead, you should refer the Project directly like this
– Jayendran
Nov 11 at 4:01
Yes, that was it. Thanks a lot for your help, I was stuck for ages.
– Cosmin
Nov 11 at 10:43
I've expanded my comment as the answer, please accept it. so that it might help others too
– Jayendran
Nov 11 at 11:02
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm trying to create a pipeline in Azure DevOps and I get compilation errors caused by a missing reference:
[warning]C:Program Files (x86)Microsoft Visual
Studio2017EnterpriseMSBuild15.0BinMicrosoft.Common.CurrentVersion.targets(2110,5):
Warning MSB3245: Could not resolve this reference. Could not locate
the assembly "ABC". Check to make sure the assembly exists on disk. If
this reference is required by your code, you may get compilation
errors.
I have a VS2017 solution with 2 projects.
ABC which is the actual application
ABC.UnitTests where I added some unit tests (I'm using MSTest)
When I build the solution locally, I'm able to do a successful build with the following steps:
Build ABC project => ABC.dll is generated
Add reference in ABC.UnitTests proj to ABC.dll
Build the entire solution => build successful
The .cs file in ABC.UnitTests references the application in this way, and generates the warning above:
using ABC;
If I do a clean build where ABC.dll is deleted and then I do a build of the entire solution I get the same MSB3245 warning. So the issue is reproducible locally if the dll does not exist.
Then, when I upload the solution to Azure DevOps, I do the following steps.
- Upload the solution from local VS2017 and a project is created in Azure
- Build the project in Azure DevOps => reference issue reported
I have a YAML config file with name azure-pipelines.yml which references the hosted 2017 agent.
pool: vmImage: 'vs2017-win2016'
Alternate flow:
- Upload the solution from local VS2017 and a project is created in Azure
- Comment out the reference to ABC.UnitTests project from the sln file
- Create the pipeline => build successful.
visual-studio azure visual-studio-2017 azure-devops
I'm trying to create a pipeline in Azure DevOps and I get compilation errors caused by a missing reference:
[warning]C:Program Files (x86)Microsoft Visual
Studio2017EnterpriseMSBuild15.0BinMicrosoft.Common.CurrentVersion.targets(2110,5):
Warning MSB3245: Could not resolve this reference. Could not locate
the assembly "ABC". Check to make sure the assembly exists on disk. If
this reference is required by your code, you may get compilation
errors.
I have a VS2017 solution with 2 projects.
ABC which is the actual application
ABC.UnitTests where I added some unit tests (I'm using MSTest)
When I build the solution locally, I'm able to do a successful build with the following steps:
Build ABC project => ABC.dll is generated
Add reference in ABC.UnitTests proj to ABC.dll
Build the entire solution => build successful
The .cs file in ABC.UnitTests references the application in this way, and generates the warning above:
using ABC;
If I do a clean build where ABC.dll is deleted and then I do a build of the entire solution I get the same MSB3245 warning. So the issue is reproducible locally if the dll does not exist.
Then, when I upload the solution to Azure DevOps, I do the following steps.
- Upload the solution from local VS2017 and a project is created in Azure
- Build the project in Azure DevOps => reference issue reported
I have a YAML config file with name azure-pipelines.yml which references the hosted 2017 agent.
pool: vmImage: 'vs2017-win2016'
Alternate flow:
- Upload the solution from local VS2017 and a project is created in Azure
- Comment out the reference to ABC.UnitTests project from the sln file
- Create the pipeline => build successful.
visual-studio azure visual-studio-2017 azure-devops
visual-studio azure visual-studio-2017 azure-devops
edited Nov 11 at 4:01
Graham
3,451123558
3,451123558
asked Nov 10 at 20:28
Cosmin
153
153
this is how I reference the main project in the .csproj of the MSTest proj <ItemGroup> <Reference Include="ABC"> <HintPath>..ABCbinDebugnetcoreapp2.1ABC.dll</HintPath> </Reference> </ItemGroup>
– Cosmin
Nov 10 at 20:48
1
you should not refer the DLL like this. Instead, you should refer the Project directly like this
– Jayendran
Nov 11 at 4:01
Yes, that was it. Thanks a lot for your help, I was stuck for ages.
– Cosmin
Nov 11 at 10:43
I've expanded my comment as the answer, please accept it. so that it might help others too
– Jayendran
Nov 11 at 11:02
add a comment |
this is how I reference the main project in the .csproj of the MSTest proj <ItemGroup> <Reference Include="ABC"> <HintPath>..ABCbinDebugnetcoreapp2.1ABC.dll</HintPath> </Reference> </ItemGroup>
– Cosmin
Nov 10 at 20:48
1
you should not refer the DLL like this. Instead, you should refer the Project directly like this
– Jayendran
Nov 11 at 4:01
Yes, that was it. Thanks a lot for your help, I was stuck for ages.
– Cosmin
Nov 11 at 10:43
I've expanded my comment as the answer, please accept it. so that it might help others too
– Jayendran
Nov 11 at 11:02
this is how I reference the main project in the .csproj of the MSTest proj <ItemGroup> <Reference Include="ABC"> <HintPath>..ABCbinDebugnetcoreapp2.1ABC.dll</HintPath> </Reference> </ItemGroup>
– Cosmin
Nov 10 at 20:48
this is how I reference the main project in the .csproj of the MSTest proj <ItemGroup> <Reference Include="ABC"> <HintPath>..ABCbinDebugnetcoreapp2.1ABC.dll</HintPath> </Reference> </ItemGroup>
– Cosmin
Nov 10 at 20:48
1
1
you should not refer the DLL like this. Instead, you should refer the Project directly like this
– Jayendran
Nov 11 at 4:01
you should not refer the DLL like this. Instead, you should refer the Project directly like this
– Jayendran
Nov 11 at 4:01
Yes, that was it. Thanks a lot for your help, I was stuck for ages.
– Cosmin
Nov 11 at 10:43
Yes, that was it. Thanks a lot for your help, I was stuck for ages.
– Cosmin
Nov 11 at 10:43
I've expanded my comment as the answer, please accept it. so that it might help others too
– Jayendran
Nov 11 at 11:02
I've expanded my comment as the answer, please accept it. so that it might help others too
– Jayendran
Nov 11 at 11:02
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
You shouldn't refer any DLL as you mentioned in the comment.
The proper way is to refer to as a project. This way the DLL takes care of itself during the build
Proper way is
References
-> (Right Click) Add References
-> From that using Projects tab
you can choose the Project which is generating that DLL(assemblies)
You can refer this SO
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
You shouldn't refer any DLL as you mentioned in the comment.
The proper way is to refer to as a project. This way the DLL takes care of itself during the build
Proper way is
References
-> (Right Click) Add References
-> From that using Projects tab
you can choose the Project which is generating that DLL(assemblies)
You can refer this SO
add a comment |
up vote
1
down vote
accepted
You shouldn't refer any DLL as you mentioned in the comment.
The proper way is to refer to as a project. This way the DLL takes care of itself during the build
Proper way is
References
-> (Right Click) Add References
-> From that using Projects tab
you can choose the Project which is generating that DLL(assemblies)
You can refer this SO
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
You shouldn't refer any DLL as you mentioned in the comment.
The proper way is to refer to as a project. This way the DLL takes care of itself during the build
Proper way is
References
-> (Right Click) Add References
-> From that using Projects tab
you can choose the Project which is generating that DLL(assemblies)
You can refer this SO
You shouldn't refer any DLL as you mentioned in the comment.
The proper way is to refer to as a project. This way the DLL takes care of itself during the build
Proper way is
References
-> (Right Click) Add References
-> From that using Projects tab
you can choose the Project which is generating that DLL(assemblies)
You can refer this SO
answered Nov 11 at 11:01
Jayendran
2,94631334
2,94631334
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243123%2fazure-devops-build-fails-warning-msb3245-could-not-resolve-this-reference%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
this is how I reference the main project in the .csproj of the MSTest proj <ItemGroup> <Reference Include="ABC"> <HintPath>..ABCbinDebugnetcoreapp2.1ABC.dll</HintPath> </Reference> </ItemGroup>
– Cosmin
Nov 10 at 20:48
1
you should not refer the DLL like this. Instead, you should refer the Project directly like this
– Jayendran
Nov 11 at 4:01
Yes, that was it. Thanks a lot for your help, I was stuck for ages.
– Cosmin
Nov 11 at 10:43
I've expanded my comment as the answer, please accept it. so that it might help others too
– Jayendran
Nov 11 at 11:02