Strange issue with instrumented assemblies build

Jun 13, 2011 at 3:40 PM

Hi,

Some of the developers in my project are having the following strange phenomena:

1. NTrace is being added to an existing project

2. The project gets built for the 1st time w/o any problems

3. Some of the project's code is changed (regardless whether it's tracing code or functional code)

4. When rebuilding the project we get the following warning:

    C:\Program Files\MSBuild\NTrace\v2.0\NTrace.CSharp.v4.0.targets(243,3): warning MSB3021: Unable to copy file "obj\Release\foo.pdb" to "obj\Trace\foo.pdb". Could not find file 'obj\Release\foo.pdb'.

   and worst, when looking both at obj\release and bin\release we see that the pdb is updated, however the dll is not (i.e. the dll that was originally built when ntrace was added is still there)

We are working with latest NTrace version on VS2010 SP1. 

As I mentioned in the beginning, this happens for some of developers, while for others everything works fine.

 

Thanks,

--Eran

Coordinator
Jun 13, 2011 at 5:05 PM
We do have to perform some MSBuild gymnastics to get VS' Intellisense to work properly. It's possible the VS-hosted compiler got into a bad state somehow.

If you were to run a Clean followed by a build rather than a Rebuild, does the error remain? Also, have you tried (I really hate to suggest this, but here goes...) closing VS followed by re-opening the project?

On Mon, Jun 13, 2011 at 10:40 AM, eranhare <notifications@codeplex.com> wrote:

From: eranhare

Hi,

Some of the developers in my project are having the following strange phenomena:

1. NTrace is being added to an existing project

2. The project gets built for the 1st time w/o any problems

3. Some of the project's code is changed (regardless whether it's tracing code or functional code)

4. When rebuilding the project we get the following warning:

C:\Program Files\MSBuild\NTrace\v2.0\NTrace.CSharp.v4.0.targets(243,3): warning MSB3021: Unable to copy file "obj\Release\foo.pdb" to "obj\Trace\foo.pdb". Could not find file 'obj\Release\foo.pdb'.

and worst, when looking both at obj\release and bin\release we see that the pdb is updated, however the dll is not (i.e. the dll that was originally built when ntrace was added is still there)

We are working with latest NTrace version on VS2010 SP1.

As I mentioned in the beginning, this happens for some of developers, while for others everything works fine.

Thanks,

--Eran

Read the full discussion online.

To add a post to this discussion, reply to this email (NTrace@discussions.codeplex.com)

To start a new discussion for this project, email NTrace@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jun 14, 2011 at 4:56 PM

Niether clean and build nor closing and reopening VS worked. The only way to build the dll is to delete obj and bin folders before building the project.

--Eran

Jun 15, 2011 at 8:03 AM

Is there any logging/tracing/any other info I can provide you for investigating this issue?

Coordinator
Jun 15, 2011 at 10:48 AM

This sounds like an MSBuild issue; please set the build logging option to diagnostic and attach/send so I can see what's happening at build time.

Thanks!

On Jun 15, 2011 3:03 AM, "eranhare" <notifications@codeplex.com> wrote:
> From: eranhare
>
> Is there any logging/tracing/any other info I can provide you for investigating this issue?
>
>
Jun 19, 2011 at 9:48 AM

When inspecting MSBuild log Andy found out that the Etw trace provider name as specified in the csproj file was incorrect - fixing that resolved the issue.

Thanks!

Jun 19, 2011 at 1:13 PM

BTW, would it be possible to add an error message/fail the build when something in NTrace definitions (as in this case) is wrong? This could have save us a lot time, and would make NTrace deployment much smoother.

Thanks,

--Eran

Coordinator
Jun 20, 2011 at 10:54 AM

I’ve been looking at exactly that. It should be in the next drop, along with the component/sub-component feature.

From: eranhare [email removed]
Sent: Sunday, June 19, 2011 8:14 AM
To: andy@hoppersoft.com
Subject: Re: Strange issue with instrumented assemblies build [NTrace:261191]

From: eranhare

BTW, would it be possible to add an error message/fail the build when something in NTrace definitions (as in this case) is wrong? This could have save us a lot time, and would make NTrace deployment much smoother.

Thanks,

--Eran

Jun 20, 2011 at 12:06 PM

That's great! Thanks.