I'm using Wix3.11 and trying to customize the ExitDialog. The source code of the dialog (ExitDialog.wxs in wix3-wix31rtm.zip) schedules this dialog with the following statement:
<Show Dialog="ExitDialog" OnExit="success" Overridable="yes" />
So, I copied this file to my local directory as MyExitDialog.wxs, rename the Dialog Id from ExitDialog to MyExitDialog and scheduled this dialog with:
<Show Dialog="MyExitDialog" OnExit="success" />
But, when I ran light, I got the following error:
MyExitDialog.wxs(37): error LGHT1050: The AdminUISequence table contains actions 'MyExitDialog' and 'ExitDialog' which both have the same sequence number -1. Please change the sequence number for one of these actions to avoid an ICE warning.
C:\build\work\eca3d12b\wix3\src\ext\UIExtension\wixlib\ExitDialog.wxs(29): error LGHT1051: The location of the action related to previous warning.
I was expecting MyExitDialog's show element overrides the original ExitDialog's show element, but it's not working that way.
Am I misunderstanding how the Overridable attribute works? Or, am I looking at the wrong ExitDialog.wxs file?
You're including something like
<UIRef Id="WixUI_Minimal"/>
in your install. You need to find the related UI file (here) and copy the contents of that file into a new wxs in your wix project. You can name this "MyUI" or something and also update the Id in the <UI Id="..."> tag from "WixUI_Minimal" to something else (for example).
In the new file you just created, update that one line
<Show Dialog="ExitDialog" OnExit="success" Overridable="yes" />
to
<Show Dialog="MyExitDialog" OnExit="success" />
Now in your <Product> update that <UIRef> to reference your new UI.
The WixUIExtension contains a wixlib with all the definitions of the UI and Dialogs. You just defined a new exit dialog in your project but the old one still exists and is defined in the WixUIExtension dll. Since you were still using the old UIRef it was bringing in everything along with your one dialog that was defined. This caused the double definition of actions with sequence -1.
The overridable tag has this text
If "yes", the sequencing of this dialog may be overridden by sequencing elsewhere.
That means you can redefine the sequencing of the dialog:
<Show Dialog="ExitDialog" Sequence="55" Overridable="yes"/>
(or Before="..." or After="..." or OnExit="...")
and not get any redefinition errors since it was marked overridable.
The root problem is that you can't have two <Show> tags both with OnExit="success"
Related
Yesterday I was able to run a plain Java class in Android Studio without any problems. I did this by creating an Application configuration:
... for running the main() method of some class I defined in the default app module, e.g.:
package com.example.myappname;
public class Api {
public static void main(String[] arguments) {
System.out.println("API test");
}
}
If I then pressed run:
... the output (which I can't show you now, because it doesn't work anymore) of main() would appear nicely in the Run Tool Window:
As far as I was aware, no gradle task or build process was invoked by running this type of configuration. But now, all of a sudden, it appears as though gradle is being executed before running, because it complains that task [:app:Api.main()] failed with message:
A problem occurred configuring project ':app'.
> Could not create task ':app:Api.main()'.
> SourceSet with name 'main' not found.
... as seen here:
I tried recreating the configuration and for the first run it worked as before again, but on rerunning the same gradle build error appears again.
Do you have any idea why this is happening and how I can solve this? Am I correct in thinking gradle should be omitted with these kinds of Application configurations?
When it worked, the output in the Run Tool Window would appear almost instantaneously and no elaborate build process appeared in the Build Tool Window, leading me to believe no gradle build process was being executed.
I got it to work again:
... but don't ask me how exactly. It appears to be very buggy.
After deleting all sorts of cache directories and files and searching all kinds of directories for the location of the configuration files I was able to find that the configurations are stored in .idea/workspace.xml of the project.
And one thing I appeared to notice is that the following "hidden" option is needed as a minimum (which I believe was not there, when it didn't work):
<method v="2">
<option name="Make" enabled="true" />
</method>
Here's a full example configuration:
<configuration name="API" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="com.example.myappname.Api" />
<module name="MyAppName.app.main" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
But sometimes it works and sometimes it doesn't. It appears to be the most reliable if I signify the classpath (-cp option in the Android Studio dialog) to be MyAppName.app instead of MyAppName.app.main.
Ironically, it started to work again when the configuration dialog claimed it couldn't find the class I wanted to run and a red X appeared in the top right corner of the configuration icon:
So, it's all a bit of a mystery to me, as to why it sometimes works and other times it does not.
PS: I was wrong about gradle not building in this type of configuration; it does.
And after a few more tests, it appears one simply shouldn't select the ".main" part when choosing a module for the classpath argument, as that appears to be some specific gradle configuration/task I don't understand well enough.
In spite of Android Studio claiming it can't find the class then (and the red X appearing), it works.
I am trying to use the below lines to get API response, but its not working for me.
Please help me.
Groovy ver = 2.4.15
OS = windows 7
#Grab(group='org.codehaus.groovy.modules.http-builder',module='http-builder',version='0.7.1')
import groovyx.net.http.HTTPBuilder
As mentioned in the comments, I think the best place to start would be to run your script with the following flag turned on:
~> groovy -Dgroovy.grape.report.downloads=true <yourscript>
that should give you some logging indicating what the grape resolution is doing and hopefully where it tried to download the file from when it failed.
For an overview of the grape resolution mechanics, you can refer to the groovy documentation on grapes.
My guess is that groovy is trying multiple resolvers (i.e. maven central, jcenter, etc) and one of them is failing early even though a later one has the artifact. In a situation like this the resolution engine naturally should keep trying until it finds a working artifact but I have seen things fail this way before.
To modify the resolution order and behavior, you should look at the file:
<your user home dir>/.groovy/grapeConfig.xml
where, if the file does not exist, groovy uses the following default data for the file:
<ivysettings>
<settings defaultResolver="downloadGrapes"/>
<resolvers>
<chain name="downloadGrapes" returnFirst="true">
<filesystem name="cachedGrapes">
<ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
<artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"/>
</filesystem>
<ibiblio name="localm2" root="file:${user.home}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
<!-- todo add 'endorsed groovy extensions' resolver here -->
<ibiblio name="jcenter" root="https://jcenter.bintray.com/" m2compatible="true"/>
<ibiblio name="ibiblio" m2compatible="true"/>
</chain>
</resolvers>
</ivysettings>
(from the groovy github repo)
Two things to note here:
The returnFirst attribute. The resolution engine will try the resolvers one by one and return the first hit for this specific artifact. If my hunch is correct, this is not working correctly and an early resolver is failing and not giving a later resolver a chance to resolve the artifact.
The list of resolvers is ordered so changing this order will affect the result.
So, long story short: turn on debugging and see if that gives anything.
Then either modify or create the grapeConfig.xml file and either:
change the order of the ibiblio elements to change the resolution order
add another maven resolver (i.e. add another ibiblio node) for a target you have verified has the artifact (and add it first in the chain to make sure one of the others does not fail first).
or play with the returnFirst flag to see if setting it to false resolves your issue
I have two build projects. lets call them project A and project A.pack. When I force build project A it asks me for Boolean parameter if I want to build project A.pack.
But I can't make in publishers block of project A a correct way to force build the project A.pack. I use conditional task but it doesn't work. In log file ccnet writes only that it fails on conditional task. What a usual way to do this in ccnet?
Update:
Sorry for my English. It's not my first language.
What I wanted to do is this:
In project A I added Boolean parameter:
<booleanParameter>
<name>ExampleParam</name>
<true name="Yes">1</true>
<false name="No">0</false>
<display>Example Param</display>
<default>No</default>
<required>false</required>
</booleanParameter>
And added conditional forcebuild in publishers like this:
<publishers>
<!-- some other tasks .. -->
<conditional>
<conditions>
<compareCondition>
<value1>${ExampleParam}</value1>
<value2>1</value2>
<evaluation>equal</evaluation>
</compareCondition>
</conditions>
<tasks>
<forcebuild>
<project>A.pack</project>
<serverUri>tcp://localhost:21235/CruiseManager.rem</serverUri>
</forcebuild>
</tasks>
</conditional>
</publishers>
When I press "force" it asks me for "Example Param", I check "Yes" and when it finishes building dashboard says that build was succesful but ForceBuildPublisher task failed.
There is no information in server log about why force build task failed.
It's CruiseControl.NET-1.6.7
Update 20150808:
I convinced my colleagues to update CCnet. In version 1.8.5 it's possible to do a conditional build like I wrote.
If the boolean parameter is true then write to a file that A.pack watches. A.pack builds if the file gets dirty. See Filesystem Source Control Block for use by A.pack in listening to the file made dirty by A.
I'm trying to distribute some SQL_SSDT Visual Studio code snippets using .vsi and .vscontent files, but I'm getting an error while installing:
The .vscontent file either contains invalid attributes or specifies a code snippet for a programming language that is not installed.
The .vscontent file is based on the documentation provided by Microsoft How to: Distribute Code Snippets
The sample on this site is the following:
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
<Content>
<FileName> </FileName>
<DisplayName> </DisplayName>
<Description> </Description>
<FileContentType> </FileContentType>
<ContentVersion>2.0</ContentVersion>
<Attributes>
<Attribute name="lang" value=""/>
</Attributes>
</Content>
</VSContent>
My file looks like this:
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
<Content>
<FileName>SSDTTest.snippet</FileName>
<DisplayName>SSDTTest</DisplayName>
<Description>SSDTTest</Description>
<FileContentType>Code Snippet</FileContentType>
<ContentVersion>1.0</ContentVersion>
<Attributes>
<Attribute name="lang" value="SQL_SSDT"/>
</Attributes>
</Content>
</VSContent>
I'm using the value SQL_SSDT since this is the required value in the .snippet files (<Code Language="SQL_SSDT">).
The installation starts as expected (double clicking on the .vsi file), the VS Content Installer pops up, lists the included content. The error occurs after hitting Finish. (Installation starts, but the above error pops up after a few seconds.)
The snippet is working fine if I copy it to the default snippet folder for SSDT (Documents\Visual Studio 2012\Code Snippets\SQL_SSDT\My Code Snippets) or if I'm adding it via snippet manager in SSDT, but the .vsi installation fails using the above file.
Am I missing something?
Installed VS products on this box:
SSDT
SSDT-BI
VS Express for Desktop (2012)
Update
I found the XML schema reference for the .vscontent files (VS2012), and it seems that the SQL_SSDT is not a valid value for the Lang attribute. It suggests that there are only four values available for the lang attribute. (csharp, jsharp, vb, xml).
Now the question is: Does SSDT add any extensions to this XML schema?
It seems that VS Content Installer has no support for deploying SSDT code snippets. There is a posted idea on visualstudio.uservoice.com which requests this feature, but it is still open.
I did not found any other resources related to this issue.
There is a possible workaround, which needs testing: You can create a PS/BAT which copies the snippet files into the VS's snippet folder for SSDT.
I created a project template from an existing project, in this case it is just a resource DLL.
I replaced some of the data in the projects with the $projectname$ tags so that the contents and the file names take the value that I enter as the project name. When I create a new project from the template I see 2 dialog boxes, the first one seems to indicate success, i.e.
The operation completed successfully.
The second one indicate that there was an access violation, i.e.
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
I press the OK button, the new project does not show up. I check the disk and only the project file (vcxproj) has been created, in this case it looks fine, no other files were created.
I checked the vcxproj file and it looks fine.
Other information:
I am using VS 2012
VS was started in administrator mode
The target location is my documents folder
Any idea?
//*eggbox
SolutionName.vcxproj file contains information about additional compiling files. All files which solution must compile must be located under same folder as SolutionName.vcxproj file.
It is very interesting issue which is correlated with next lines of vcxproj file
<ItemGroup>
<ClCompile Include="Example\AdditionCompiledFile.cpp" />
<ClCompile Include="ConsoleApplication1.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMD|Win32'">Create</PrecompiledHeader>
</ClCompile>
The issue is reproduced on VS 2013 also.