I'm trying to learn Windows Phone dev by making a basic app that provides information about Pokemon. To do this, I've created a portable class library (PokeLib.dll) so it's compatible with universal apps. I've tested this via a project in the same solution ("Test"), and it works fine. You can take a look at the code for these on my Github, but as far as I can tell, it's all good. These two projects are in the one solution. For the Windows Phone app's solution, I added PokeLib as an "existing project", added the references, and written some a couple lines of code to make sure I could call it okay:
MainPage.xaml:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button Name="GetDataButton" Content="GetData" Click="GetDataButton_Click" Grid.Row="0" HorizontalAlignment="Center"/>
<TextBlock Name="DataText" Text="Click to get data" Grid.Row="1" Padding="10"/>
</Grid>
MainPage.xaml.cs:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
p = new Pokemon(1); // gets data for Pokemon #1 (Bulbasaur)
}
Pokemon p;
int counter = 0;
private async void GetDataButton_Click(object sender, RoutedEventArgs e)
{
DataText.Text = "Fetching... Count: " + ++counter;
if (counter == 1) // first time button's clicked
{
await p.Create(); // populates the data container
DataText.Text = String.Format("Pokemon #{0}: {1}", p.Id, p.Name);
}
}
When I try to run this on a phone emulator, I get the following message:
. I am building the project as "debug" and have "Enable Just My Code" unchecked. I am not sure what to do under the Symbols pane, but I can add a screenshot of that too, if it'd be useful.
Anyway, the app opens, but freezes when I press the GetData button. I expected it would freeze for a moment since that call is done synchronously, but this is permanent. However, no errors/exceptions are thrown. The debugger also doesn't respond when I attempt to step into the p.Create() call (likely stemming from the message in the screenshot).
Anyone have an idea of what I'm doing wrong? Thanks!
You can go to the Project Properties -> Build -> Advanced button -> Debug info drop-down and change its value to "full".
In Visual Studio I selected Build -> Clean Solution.
That got rid of this message
I just fixed the same error. I went to Tools -> Options -> Debugging -> Symbols and pressed Empty Symbol Cache in Visual Studio 2013. Probably trashing your bin and obj folders does pretty much the same in a much less elegant way.
I was having this error when I had an assembly that was in the GAC and Visual Studio was not removing it before compile/debug. I was able to resolve it by removing that library (dll) from the GAC.
//if pokelib.dll contained assembly: PokeLibrary.Pokemon
//and it showed up in the GAC (c:\windows\assembly\) with that assembly name
gacutil /u PokeLibrary.Pokemon
This resolved the warning condition and allowed me to debug once again.
You are debugging your code with an referenced dll that does not compiled for debug mode.
Compile referenced dll in debug and use it.
Check the referenced dll adresses to be sure you are using correct dll.
Make sure you do not have multiple VS windows open, specifically of the same project! :)
- close visual studio.
- Performed quick cleanup using cclener.
- Clean solution & Rebuild project
& this worked for me. ( I really don't know how )
In my case I had another version of the application running that was using the same .dll. This prevented the GAC getting updated with the debug version. I had the kill the process through task manager.
The only way that I can get around this message is to go to Debug > Options and Settings > Debugging > Symbols, and then selecting the radio button named 'All Modules, unless excluded.'
I'm not sure that this is the ideal workaround, but it's working for now.
You can use DotPeek
to generate PDB files for the library, then place it in the same folder as your dll. One more option, if the code is open-source, is to clone the repo, add the project to your project, add dependency, set build order and start debugging.
I found that the project I was receiving the message about, was being optimized when built.
I went into the projects properties, Compile Tab, Advanced Compile Options... and unchecked the Enable Optimizations
checkbox
this is how mine got fixed,
I had the same page open in two browsers and at first I choose 1st browser then 2nd browser fro debug without closing 1st browser, closing one of them fixed it...
I also faced the same error and in my case the problem was because of web.config transformation file which I wanted to setup other than debug.config.
I had to track a bug using stage branch and therefore I setup the active solution configuration as Stage.
- Go to the property option of your project solution
- Click on Configuration Manager button on top right hand side.
- Now drill down the drop down option active solution configuration and you choose configuration (web) file for your project to act on when you run it.
I had chosen the stage and when I build the project I got this error and because of that debuggers were become inactive.
But when I set the option back to debug, issue got resolved.