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: 'System.ComponentModel.Composition' 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 'Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName="Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler")' on part 'Microsoft.VisualStudio.Cascade.CascadePackage'.
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 'Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName="Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler")' on part 'Microsoft.VisualStudio.Cascade.CascadePackage'.
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 'Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName="Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService")' on part 'Microsoft.VisualStudio.Cascade.CascadePackage'.
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: 'System.ComponentModel.Composition'
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 '
Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName="
Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler")' on part '
Microsoft.VisualStudio.Cascade.CascadePackage'.
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 '
Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName="
Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler")' on part '
Microsoft.VisualStudio.Cascade.CascadePackage'.
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 '
Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName="
Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService")' on part '
Microsoft.VisualStudio.Cascade.CascadePackage'.
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.
Related
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>
I am trying port to Dart this nice paper-datatable implementation using custom_element_apigen.
Some problems occurred and sought to find solutions according to my understanding (perhaps included more problems!).
However, still an error is thrown and not been able to move on. I need some help about how port to Dart!!! I will briefly describe the steps, errors and solutions that gave and a link to source code of the project test:
1) I following the steps, accord to https://github.com/dart-lang/custom-element-apigen. I had problems on Windows, but I got to resolve after (custom_element_apigen: gives an error importing paper-datatable to Dart)
2) apigen.yaml used with custom_element_apigen does not clear how to configuration.
I used the "trial-and-error" method until no more error occur. It was so:
files_to_generate:
- paper-datatable\paper-datatable.html
- paper-datatable\paper-datatable-column.html
- paper-datatable\paper-datatable-edit-dialog.html
- paper-datatable\paper-datatable-card.html
- paper-datatable\paper-datatable-styles.html
- paper-datatable\datatable-icons.html
files_to_load:
- package:polymer_elements/src/paper-material/paper-material.html
- package:polymer_elements/src/iron-ajax/iron-request.html
- package:polymer_elements/src/iron-ajax/iron-ajax.html
- package:polymer_elements/src/iron-form/iron-form.html
- package:polymer_elements/src/iron-meta/iron-meta.html
- package:polymer_elements/src/iron-icon/iron-icon.html
- package:polymer_elements/src/iron-iconset-svg/iron-iconset-svg.html
- package:polymer_elements/src/paper-ripple/paper-ripple.html
- package:polymer_elements/src/paper-checkbox/paper-checkbox.html
- package:polymer_elements/src/neon-animation/animations/opaque-animation.html
- package:polymer_elements/src/neon-animation/animations/fade-in-animation.html
- package:polymer_elements/src/neon-animation/animations/fade-out-animation.html
- package:polymer_elements/src/paper-tooltip/paper-tooltip.html
- package:polymer_elements/src/iron-resizable-behavior/iron-resizable-behavior.html
- package:polymer_interop/src/js/debug/src/lib/template/templatizer.html
Some paths imports were wrongs on paper-datatable*.(html and dart) files. p.e. : import 'packages\polymer_interop\src\js\debug\src\lib\template\templatizer.dart'; I changed to import 'package:polymer_interop/src/behaviors/templatize.dart';
on paper_datatable_column.dart.
I changed reserved Dart word default to defaultx on get defaultx => jsElement[r'default']; and set defaultx(value) { jsElement[r'default'] = (value is Map || (value is Iterable && value is! JsArray)) ? new JsObject.jsify(value) : value;} instructions on paper_datatable_column.dart and paper_datatable_card.dart;
After the following erros were occuring in several polymer componentes. P.e.: Failed to execute 'registerElement' on 'Document': Registration failed for type 'iron-meta'. A type with that name is already registered.
I changed all paths into paper-datatable*.* files to get official package (pub.dartlang) of the polymer and polymer elements. P.e.: <link rel="import" href="paper_icon_button_nodart.html"> to <link rel="import" href="../../packages/polymer_elements/paper_icon_button_nodart.html">. The register problem does not occur more!
But now, the following problem is occuring and I don't know how to resolve it: On debug console appear the following message: Uncaught SyntaxError: Unexpected token =>. The web app works on browser, but the paper-datatable does not appear.
My complete test project (webstorm) is on https://github.com/supermuka/paper_datatable_port_dart_demo
Is there some wrong in how I used Dart custom_element_apigen (and apigen.yaml)? Did I some things wrong on paths changed? I also need to change some other source?
Thanks!
Most likely you just created a syntax error when editing the files. That being said there are options built in to do most of the things you manually did, and that also makes it easier to update in the future.
omit_imports: This is used on individual items in the files_to_generate section. It can be used to get rid of the templatizer import entirely, resolving issue #3. See example here.
name_substitutions: This is used on individual items in the files_to_generate section, and allows you to rename fields. You can use this to resolve issue #4, example here.
stubs_to_generate: This option allows you to generate stubs which actually import elements from a different package, this should resolve issue #5 you listed above. See example usage here.
Hopefully that helps, and applying those options will just resolve your issues.
I am using a slim_version of cowboy, I have also tried that on slim_yaws on nitrogen. What puzzles me is the abrupt deletion of the wf.hrl file by the VM. I do not understand what causes this!! Here is what appears in the console.
Warning. Deleted "wf.hrl" file included in existing src files: [list_module_files_with_the_wf.hrl_include >]
I am puzzled because the module which use the wf.hrl cannot compile after its deletion. I have experienced it on slim_cowboy and slim_yaws. It is abrupt!
I'm not sure why, but on my Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.4) css-mode is not loading and with M-x css-mode gives this error in Messages:
Symbol's function definition is void: apropos-macrop
or
File mode specification error: (void-function apropos-macrop)
my css file (ending in .css) is in Fundamental. I just tried it on a 23.1.1 and CSS mode comes up and works fine.
Update: Traced problem to my autoloads. i.e., comment out autoloads
;(load "~/modes/autoloads" 'install)
and the problem goes away. I'm not sure what to hack with an autoloads file. Any way to "step" through an autoloads? Here's my autoloads: http://gmcongo.org/temp/autoloads
In Emacs 24.4 and the bleeding edge versions leading to it (like 24.3.50+), apropos-macrop has been replaced by macrop. In css-mode.el, replace the call to apropos-macrop with a call to macrop and the error goes away.
Building upon the existing correct answer, you can create an alias in your ~/.emacs instead of editing css-mode (if for example, it came in a package with your distribution):
;; For css-mode, temporarily.
(defalias 'apropos-macrop 'macrop)
Posting here is always my last resort, but I'm going crazy here. I'm a Mule ESB beginner. I've been trying to do some simple examples to get me on the right track.
But I've encountered a problem with one of the examples I've seen on the mule website...
http://www.mulesoft.org/documentation/display/current/WSDL+Connectors
I'm trying to set up a generic WSDL endpoint, which invokes a web service without generating a client.
The WSDL I'm trying to access...
http://www.webservicex.net/CurrencyConvertor.asmx?WSDL&method=ConversionRate
The problem is, I keep getting the following error
[ERROR] IOException during exec() of compiler "javac". Check your path environment variable.
ERROR 2013-04-19 09:27:07,920 [[soap].soapFlow1.stage1.02] org.apache.cxf.endpoint.dynamic.DynamicClientFactory: Could not compile java files for http://www.webservicex.net/CurrencyConvertor.asmx?WSDL&method=ConversionRate?wsdl.
ERROR 2013-04-19 09:27:07,934 [[soap].soapFlow1.stage1.02] org.mule.exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message : Unable to create JAXBContext for generated packages: Provider com.sun.xml.bind.v2.ContextFactory could not be instantiated: javax.xml.bind.JAXBException: "net.webservicex" doesnt contain ObjectFactory.class or jaxb.index (java.lang.IllegalStateException)
Code : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. "net.webservicex" doesnt contain ObjectFactory.class or jaxb.index (javax.xml.bind.JAXBException)
com.sun.xml.bind.v2.ContextFactory:183 (http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/xml/bind/JAXBException.html)
2. Provider com.sun.xml.bind.v2.ContextFactory could not be instantiated: javax.xml.bind.JAXBException: "net.webservicex" doesnt contain ObjectFactory.class or jaxb.index (javax.xml.bind.JAXBException)
javax.xml.bind.ContextFinder:-1 (http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/xml/bind/JAXBException.html)
3. Unable to create JAXBContext for generated packages: Provider com.sun.xml.bind.v2.ContextFactory could not be instantiated: javax.xml.bind.JAXBException: "net.webservicex" doesnt contain ObjectFactory.class or jaxb.index (java.lang.IllegalStateException)
org.apache.cxf.endpoint.dynamic.DynamicClientFactory:363 (null)
4. Unable to create JAXBContext for generated packages: Provider com.sun.xml.bind.v2.ContextFactory could not be instantiated: javax.xml.bind.JAXBException: "net.webservicex" doesnt contain ObjectFactory.class or jaxb.index (java.lang.IllegalStateException) (org.mule.api.DefaultMuleException)
org.mule.module.cxf.builder.AbstractOutboundMessageProcessorBuilder:96 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/DefaultMuleException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
javax.xml.bind.JAXBException: "net.webservicex" doesnt contain ObjectFactory.class or jaxb.index
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:183)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
And yes, I've hunted around the internet for hours looking for a solution.
Things I've done to try fix the problem.
Make sure the javac path is set in the environment variables.
(%JAVA_HOME%\bin)
Make sure that mule studio has the correct path to JRE
I know it's a simple problem, but I need to figure it out to tackle a larger project that I have in mind.
If anyone could shed some light on a solution this problem, then I'd be extremely grateful.
Thanks :)
Other info:
Using Java 1.7
Using MuleStudio 3.4
Ok, after trying and failing at many different solutions, I've figured it out.
I've seen a lot of people asking the same question as me, with very few solutions.
Here is mine...
The JRE was incorrect.
My java directory consisted of..
And Mule studio was using the folder jre7
So I changed it to use the JRE in the directory jdk1.7.0_17/jre
Ran it again and.. OMG it worked!!
Here is how to do it in mule studio/eclipse...Right Click on your Project --> Properties --> Java Build Path --> Libraries Tab --> Click JRE System Library --> Press Edit --> Click Alternate JRE --> Click Installed JREs.. --> Then Add the JRE from the correct directory like I stated above.
Hope this helps anyone with the same problem! :)