Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: msbuild warning MSB4011


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Jul 14, 2016 6:39 AM Last Post By: Markus Spoettl Threads: [ Previous | Next ]
Markus Spoettl

Posts: 51
Registered: 10/10/99
msbuild warning MSB4011  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 14, 2016 5:59 AM
Hi,

I'm using msbuild to build my projects (Delphi 10 Seattle) on the command line and I always get the following warning as the very first thing in the output:

C:\projects\myproj.dproj(1237,13): warning MSB4011: There is a circular reference involving the im
port of file "E:\Studio\17.0\Bin\CodeGear.Delphi.Targets". This file may have been imported more than once, or you may
have attempted to import the main project file. All except the first instance of this file will be ignored.


The projects were upgraded from Delphi 2007 were no msbuild existed, as far as I know. Happens to any project I build this way. Does anyone have any idea how this came to be and how to get rid of it?

Thanks!
Regards
Markus
Markus Spoettl

Posts: 51
Registered: 10/10/99
Re: msbuild warning MSB4011  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 14, 2016 6:39 AM   in response to: Markus Spoettl in response to: Markus Spoettl
Hm, so I looked at the .dproj files and they all have two lines that import the file

<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>


situated before the <ItemGroup> tag and then

<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>


following the </ItemGroup> tag. Maybe that's the reason? Circular reference isn't exactly what I would call it. Is it save to remove one of these imports and if so, which one, and why is it there twice?

Regards
Markus
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02