External Merged Dictionaries Broken in Silverlight 3 RTM? - silverlight-3.0

I just want to reference a resource dictionary in a referenced assembly.
Assembly name: ResourceTest.Content
Resource Dictionary Path: ./Dictionary2.xaml
This was working on SL3 Beta 1:
<ResourceDictionary Source="ResourceTest.Content;component/Dictionary2.xaml" />
I tried this in Blend 3+Sketchflow and this works (at design time):
<ResourceDictionary Source="pack://application:,,,/ResourceTest.Content;component/Dictionary2.xaml" />
But, either way, when I run from Visual Studio, I get the following error:
Attribute ResourceTest.Content;component/Dictionary2.xaml value is out of range. [Line: 10 Position: 44]
Attribute pack://application:,,,/ResourceTest.Content;component/Dictionary2.xaml value is out of range. [Line: 11 Position: 44]

Try adding a / before your Assembly name:
This should work ...

Related

"Consider app.config remapping" warnings in brand new project

I've created a brand new ASP.NET Framework MVC project (using the built in project template in Visual Studio 2019). This project was converted to use PackageReference using the answer provided here.
When I do a "Rebuild Solution", everything is fine.
I then add a new ASP.NET Framework Class Library (using the build in project templte in Visual Studio 2019) to the solution.
I do another "Rebuild Solution" and everything is still fine.
Now, when I add a reference to the class library project in the web project I get the following warnings when rebuilding the solution:
Consider app.config remapping of assembly "System.Buffers, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" from Version "4.0.2.0" [] to Version "4.0.3.0" [C:\Users\Me\.nuget\packages\system.buffers\4.5.0\ref\net45\System.Buffers.dll] to solve conflict and get rid of warning.
3> Consider app.config remapping of assembly "System.Memory, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" from Version "4.0.1.0" [] to Version "4.0.1.1" [C:\Users\Me\.nuget\packages\system.memory\4.5.3\lib\netstandard2.0\System.Memory.dll] to solve conflict and get rid of warning.
3> Consider app.config remapping of assembly "System.Numerics.Vectors, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.3.0" [] to Version "4.1.4.0" [C:\Users\Me\.nuget\packages\system.numerics.vectors\4.5.0\ref\net46\System.Numerics.Vectors.dll] to solve conflict and get rid of warning.
3> Consider app.config remapping of assembly "System.Runtime.CompilerServices.Unsafe, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.4.1" [] to Version "4.0.5.0" [C:\Users\Me\.nuget\packages\system.runtime.compilerservices.unsafe\4.6.0\ref\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll] to solve conflict and get rid of warning.
3> Consider app.config remapping of assembly "System.ValueTuple, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" from Version "4.0.2.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\Facades\System.ValueTuple.dll] to Version "4.0.3.0" [C:\Users\Me\.nuget\packages\system.valuetuple\4.5.0\ref\net47\System.ValueTuple.dll] to solve conflict and get rid of warning.
Here's a selection from the detailed build output:
1> Encountered conflict between 'Reference:C:\Users\Me\.nuget\packages\system.valuetuple\4.5.0\ref\net47\System.ValueTuple.dll' and 'Platform:System.ValueTuple.dll'. Choosing 'Reference:C:\Users\Me\.nuget\packages\system.valuetuple\4.5.0\ref\net47\System.ValueTuple.dll' because AssemblyVersion '4.0.3.0' is greater than '4.0.2.0'.
1> Encountered conflict between 'Platform:System.ValueTuple.dll' and 'CopyLocal:C:\Users\Me\.nuget\packages\system.valuetuple\4.5.0\lib\net47\System.ValueTuple.dll'. Choosing 'CopyLocal:C:\Users\Me\.nuget\packages\system.valuetuple\4.5.0\lib\net47\System.ValueTuple.dll' because AssemblyVersion '4.0.3.0' is greater than '4.0.2.0'.
1> Unified primary reference "System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51".
1> Using this version instead of original version "4.0.2.0" in "C:\Users\Me\.nuget\packages\system.text.json\4.6.0\lib\net461\System.Text.Json.dll" because AutoUnify is 'true'.
1> Resolved file path is "C:\Users\Me\.nuget\packages\system.valuetuple\4.5.0\ref\net47\System.ValueTuple.dll".
1> Reference found at search path location "{RawFileName}".
1> This reference is not "CopyLocal" because at least one source item had "Private" set to "false" and no source items had "Private" set to "true".
1> The ImageRuntimeVersion for this reference is "v4.0.30319".
I haven't done anything other than creating a project, converting to PackageReference, adding a class library, and adding a reference to that library. I haven't made any other changes at all. I haven't even added any new NuGet packages, so everything should be as clean as it can be. Yet I get these warnings!
If I create an identical solution without converting to PackageReference the warnings are never displayed, so it obviously has something to do with PackageReference, but what/why/how?
So why do these warnings appear in a "clean" solution? Is there anything I can do to make them disappear without having to add remappings in the web.config file?
Download a demo solution with the issue

The 'CascadePackage' package did not load correctly

I just did an update to VS2019(16.9.0) and now I get this message. (actually on two machines). A restart does not resolve the problem.
What is the CascadePackage?
Can I just say No to dialogue box and be OK?
Also...the file it mentions to examine...does not exist anymore, nore the directory it was in.
I did find this line in the latest ActivityLog.xml
<entry>
<record>894</record>
<time>2021/03/05 13:52:21.259</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [CascadePackage]Source: &apos;System.ComponentModel.Composition&apos; Description: The composition produced multiple composition errors, with 3 root causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information.
1) No exports were found that match the constraint:
ContractName Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler
RequiredTypeIdentity Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler
Resulting in: Cannot set import &apos;Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName="Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler")&apos; on part &apos;Microsoft.VisualStudio.Cascade.CascadePackage&apos;.
Element: Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName="Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler") --> Microsoft.VisualStudio.Cascade.CascadePackage
2) No exports were found that match the constraint:
ContractName Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler
RequiredTypeIdentity Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler
Resulting in: Cannot set import &apos;Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName="Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler")&apos; on part &apos;Microsoft.VisualStudio.Cascade.CascadePackage&apos;.
Element: Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName="Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler") --> Microsoft.VisualStudio.Cascade.CascadePackage
3) No exports were found that match the constraint:
ContractName Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService
RequiredTypeIdentity Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService
Resulting in: Cannot set import &apos;Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName="Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService")&apos; on part &apos;Microsoft.VisualStudio.Cascade.CascadePackage&apos;.
Element: Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName="Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService") --> Microsoft.VisualStudio.Cascade.CascadePackage
</description>
<guid>{D86E17D6-7FC7-47F4-9259-21748EDFF93B}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
Seem like this was caused by LiveShare.
From Visual Studio Developer Community
Just search for
The 'CascadePackage' package did not load correctly
As for my two issues:
On one machine...the error went away by starting VisualStudio.
On another machine I went into Tools->Get Tools and Features...
Click on Individual components search for Live Share. Uncheck it.
Restart VS.
Go back into Tools->Get Tools and Features... Click on
Individual components search for Live Share. Check it back.
More about the ActivityLog...
Visual Studio uses a /log option on update. This creates the ActivityLog.xml.
More here /Log (devenv.exe) This is something you can also do yourself.
The description part of the ActivityLog.xml will list where the problems are. Here is an edited breakdown of the original message in the OP.
<entry>
<record>894</record>
<time>2021/03/05 13:52:21.259</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [CascadePackage]Source: &apos;System.ComponentModel.Composition&apos;
Description: The composition produced multiple composition errors, with 3 root causes.
The root causes are provided below.
Review the CompositionException.Errors property for more detailed information.
1) No exports were found that match the constraint:
ContractName Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler
RequiredTypeIdentity Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler
Resulting in: Cannot set import &apos;
Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName="
Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler")&apos; on part &apos;
Microsoft.VisualStudio.Cascade.CascadePackage&apos;.
Element: Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName="
Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler") -->
Microsoft.VisualStudio.Cascade.CascadePackage
2) No exports were found that match the constraint:
ContractName Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler
RequiredTypeIdentity
Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler
Resulting in: Cannot set import &apos;
Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName="
Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler")&apos; on part &apos;
Microsoft.VisualStudio.Cascade.CascadePackage&apos;.
Element: Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName="
Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler") -->
Microsoft.VisualStudio.Cascade.CascadePackage
3) No exports were found that match the constraint:
ContractName
Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService
RequiredTypeIdentity
Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService
Resulting in: Cannot set import &apos;
Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName="
Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService")&apos; on part &apos;
Microsoft.VisualStudio.Cascade.CascadePackage&apos;.
Element: Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName="
Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService") -->
Microsoft.VisualStudio.Cascade.CascadePackage
</description>
<guid>{D86E17D6-7FC7-47F4-9259-21748EDFF93B}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
To fix this error, please update to Visual Studio 16.9.2 - it has been fixed there. It's also mentioned in the Release Notes:
Fixed an issue causing an error message indicating the CascadePackage did not load correctly
I am on version 16.9.4 and still experiencing this issue. However I was able to get around it by either enabling or disabling the LiveShare extension (Extensions >> Manage Extensions >> Installed >> Live Share), and then recent VS.
If this doesn't work try reverting to the previous version, or updating it.
Sometimes I have to try the above a couple of times to get it working.
Usually this error goes away on its own, after upgrading the Live Share extension and rebooting Visual Studio a couple of times (usually at least three times).
However, sometimes, that does not work. In these cases, cleaning the MEF cache as described manually (by deleting the content of %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache), or automating it via the extension Clear MEF Component Cache have solved the problem.
Clearly, if you do not wish to use Live Share, you could just disable it from the Extensions menu and the package will not even be loaded by Visual Studio.
Update: I noticed that the issue sometimes occurs even with Live Share disabled. In all my (many) attempts, toggling it resolved the startup issue after clearing the MEF cache.

BDD with Specflow in Visual Studio 2017 -featurefile Error CS1029

I am trying out BDD with Specflow in Visual Studio 2017. Previously I had created a new project and added Specflow and Nunit using NuGet Package Manager. From the Solution Explorer, I right click and select Add New Item. From the Add New Item window, I could see SpecFlow feature File and Feature.cs file
But I open the Feature.cs it's showing empty with the message
<#error Generation error: The element may only appear once in this section.>
Then I try to build the solution then I'm getting error on Output
Error CS1029
error: 'Generation error: The element may only appear once in this section.'
The references I can see from Solution Explorer are: SpecRun.SpecFlowPlugin TechTalk.SpecFlow TechTalk.SpecRun NUnit.VisualStudio.TestAdapter
Am I missing something?
Thanks, Mohammed
If you have a scenario outline, but you for get to write the Examples-Keyword, you will get the following error during the build process:
CS1029 #error: 'Generation error: Sequence contains no elements' in Line 1 of MyFeature.feature
It took me some hours in my large created feature file to locate my error. I deleted the temp files, restarted visual studio several times, but it was difficult to figure out why it occurs.
Could you somehow improve the error messages e.g. with a better location, a simple syntax check before or something similar?
As far as I understand, the ScenarioOutline, followed by a will allways need at least an Examples keyword and a table with this varname, before an other Tag like Scenario, etc. is allowed again. I would appreciate to have such markup
?xml version="1.0" encoding="utf-8"?>
configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
</configSections>
<specFlow>
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config --><!-- use unit test provider SpecRun+NUnit or SpecRun+MsTest for being able to execute the tests with SpecRun and another provider --><unitTestProvider name="SpecRun" /><plugins>
<add name="SpecRun" />
</plugins></specFlow>
</configuration>

Error Running MVC Application in Visual Studio 2013

When I ran MVC application on visual studio 2013 for the first time, I got error
Unhandled exception at line 1, column 41 in res://nvqsy.dll/BOOTSTRAP/BODY
0x800a1391 - JavaScript runtime error: 'BgScript' is undefined
<HTML><title>BGSCR</title><body><SCRIPT>eval(BgScript);
I'm gratefull for the Help.
BgScript is not known currently. You will need to emit a value for BgScript before you pass it to eval. It's hard to say where that value should be coming from, but you would either need to import another js file which has that value or emit the value via MVC to the script like so:
<script>
var BgScript = '#Model.BgScript';
eval(BgScript);
</script>
The sample code assumes that there is a property BgScript available on the model.

Entity Framework Power Tools Beta 2 errors out website

My Site was working fine and then I installed Entity Framework Power Tools Beta 2, now the site no longer works. It seems that it must be a runtime error because there are no errors in VS 2012 IDE. There are 40 warning pertaining to the stored procs that it created such as:
(EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_WebPartState_User') AND (type = 'V'))) )
It states:
Warning 1 SQL71502: Procedure: [dbo].[aspnet_AnyDataInTables] has an unresolved reference to object [dbo].[sysobjects].[type]. C:\xxxxx\documents\visual studio 2012\Projects\MyProjectName\dbo\Stored Procedures\aspnet_AnyDataInTables.sql 51 94 MyProjectAzure
It doesnt like the "name", "sysObjects", and "type". in the line of code above. This happened when I reversed-engineered-names.
But I cant seem to find out what the site is erroring to. Has anyone else had this issue?

Resources