confluentinc / confluent-kafka-dotnet

Confluent's Apache Kafka .NET client
https://github.com/confluentinc/confluent-kafka-dotnet/wiki
Apache License 2.0
53 stars 857 forks source link

VS2015 - Failed to make the following project runnable ... [file] is being used by another process #284

Closed NiallHdn closed 6 years ago

NiallHdn commented 7 years ago

Description

Building a .net core Web Api project with a reference to a Library project with a dependency on Confluent.Kafka results in the following error :

Failed to make the following project runnable: Tii.ProjectReporting.Intranet.Api (.NETFramework,Version=v4.5.2) reason: The process cannot access the file 'c:\users...\packages\librdkafka.redist.0.11.0\runtimes\win7-x64\native\librdkafka.dll' because it is being used by another process. WebProjectName C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 262

Have verified that the file, librdkafka.dll is not locked by another process, that it exists and is accessible.

How to reproduce

Try building WebApplication2 in this project => https://github.com/NiallHdn/confluentkafka-build-problem

Checklist

Please provide the following information:

treziac commented 7 years ago

We don't test on project.json anymore as it was replaced by new csproj (we do test net452 and netcore on various vs dist). Also as side note, you don't use .net core but net452 with project.json format from what I saw

Will try to reproduce when back from holidays next week

mhowlett commented 7 years ago

Echoing @treziac: we don't support project.json anymore and nor does Microsoft. Your first step should be to move away from this. If you still have problems, feel free to update in this thread.

treziac commented 7 years ago

1) I can't compile the xproj projects. The VSToolPath the xproj define does not exist on my computer, with default path for dotnetsdk used, didn't try harder (may do this week to understand what is going on) 2) opening with vs2017 (and converting to new csproj), I have no problem to run both WebAPI

treziac commented 7 years ago

From what I remember when I used xproj, the project.json dotnet sdk doesn't support very well a mix of non-nuget project references between standard projects (your class libraries which are standard 4.5 csproj) and xproj. I assume your project would work if you create an nuget for your class libraries and reference them in yout webapp, or if your classLibrary was a project.json project, or if your webapp was a standard net45 csproj as you can use asp.net core with old csproj. (but won't test, I encourage you to migrate to new csproj - only issue is that you will need to upgrade to vs2017, which may indeed be problematic in terme of licence purchasing giving your needs/company ; but you can also use vsCode or vs2017 community, or any other ide supporting dotnet core )

NiallHdn commented 7 years ago

Many thanks for your responses guys. It sounds like upgrading to vs2017 might be our best option since we will have to do so at some point anyway. I'll update this issue when I've retried in vs2017.

mhowlett commented 6 years ago

closing as no longer relevant.