I use Asp.net 4, in my Web.Config (in the root for my site) I have this code
<pages enableViewState="true" theme="Cms-FE-01" validateRequest="true">
</pages>
I need exclude applying of theme="Cms-FE-01" for a subfolder.
Any idea how to do it?
I solve the problem adding in the sub folder a new web.config with this settings
<pages enableViewState="true" theme="" validateRequest="true">
</pages>
if you guys know another way please post. thanks!
Related
Does anybody know how to add custom package source to Visual Studio Code?
E.g. I'd like to add https://www.myget.org/F/aspnet-contrib/api/v3/index.json as a package source and drive these packages through project.json.
To add to the answer, adding a nuget.config in the project solves it for the project. Adding to the root is ok. The config could look like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="MyGet" value="https://www.myget.org/F/aspnet-contrib/api/v3/index.json" />
</packageSources>
</configuration>
Another option that worked for me and was actually needed as part of my CI/CD pipeline is to use dotnet nuget add source <repo-url> --name <repo-name>
Simply call that before you call dotnet restore or dotnet build
Reference:
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-add-source
Note - if your custom package source is password protected, then the credentials should also be part of the config file.
<packageSourceCredentials>
<MyGet> <!--package src name-->
<add key="Username" value="something" />
<add key="ClearTextPassword" value="thepassword" />
</MyGet>
</packageSourceCredentials>
And for anyone wondering why the credentials have to be in clear text (which defeats the whole purpose of having credentials in the first place, since this config file will also go into source control).
This is an open issue in dotnet / nuget cli. Ref github issue # 5909 & 1851
You can add a NuGet.config file and specify the package source in there. Some reference docs: https://learn.microsoft.com/en-us/nuget/schema/nuget-config-file
I have a folder in source control that is not mapped and I want to add a subfolder that is also not mapped.
It seems that I first have to create a mapping, then check in the subfolder and then remove the mapping. Is there a better way?
I am not sure is a good idea to mix in the same folder files that are stored in TFS and files that should not be stored. Because is a classic when you change/move to another PC you forgot those files. If they are not important I suggest to keep them in another place.
Anyway, if you want you can modifiy .vbproj/.csproj files and manually add your entries. They will not be added to Source Control automatically when you reload the project.
<ItemGroup>
<None Include="Temp\file1.txt" />
<None Include="Temp\Nested\file2.txt" />
</ItemGroup>
I intended to use Fody.PropertyChanged in one of my projects, and it was properly added via NuGet:
Install-Package PropertyChanged.Fody
I realized, it was in the wrong project, so I used the uninstall command:
Uninstall-Package PropertyChanged.Fody
After that I added it to the proper project.
Now, when I try to build my solution, I get the following error in the initial project that shouldn't have Fody installed:
Fody: You don't seem to have configured any weavers. Try adding a Fody
nuget package to your project. Have a look here
http://nuget.org/packages?q=fody for the list of available packages.
There is no reference to Fody in the project, I deleted the Fody reference from the packages.config file and there is no XML file.
What else should I do?
You need to also
Uninstall-Package Fody
Remove The "FodyWeavers.xml" and Open the Project file with NotePad or notePad++ and remove the following lines
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<Import Project="..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets" Condition="Exists('..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets')" />
I guess you've recently updated the Fody library? When it asked to replace the existing "FodyWeavers.xml" you might have permitted it to do so. If you have a backup of the project, get the "FodyWeavers.xml" from that and replace it with the new one. Clean and Rebuild the solution.
This doesn't specifically address the project you don't want Fody in, but sometimes VS gives vague/odd errors.
I just went through a similar issue after installing PropertyChanged.Fody for the first time, and couldn't build as soon as I included and referenced it... I wonder if any of these details from my experience might help (making sure these points exist in the project you want the lib in).
Make sure you have the following references in your packages.config from when you ran Install-Package PropertyChanged.Fody:
<package id="Fody" version="1.24.0" targetFramework="net45" developmentDependency="true" />
<package id="PropertyChanged.Fody" version="1.49.0" targetFramework="net45" developmentDependency="true" />
Make sure there is FodyWeavers.xml in the top level of the project you want to use it in.
FodyWeavers.xml should look like this (I had to add <PropertyChanged /> to mine)
<?xml version="1.0" encoding="utf-8" ?>
<Weavers>
<PropertyChanged />
</Weavers>
I'm triyng to create a generic phing script that will build a joomla plugin.
Each joomla plugin must hava an .xml file that is used by joomla system to install the plugin. In this xml file we need to define what files and folders our zip archive has like this:
<files>
<folder>folder1</folder>
<filename plugin="nameofplugin">nameofplugin.php</filename>
<filename>index.html</filename>
</files>
Now, because I'm lazy and I don't want to do this thing always myself I want to have the phing script do this for me.
I have all the plugin files moved to a specific folder like this:
-pluginFolder
--folder1
--nameofplugin.php
--index.php
I see that I can use foreach like this:
<foreach param="dirname" absparam="absname" target="subtask">
<fileset dir="${destination.dir}">
<type type="file" />
<depth max="0" min="0" />
</fileset>
</foreach>
<target name="subtask">
<echo msg="<file>: ${dirname}" />
</target>
now here in the subtask I fail to figure out how to do merge all the files to a single variable so that I can then use replacetokens for example?
Any ideas about this? Should I build my own phing class that does this? Or is there an easy way to achieve this with what phing has to offer out of the box?
Ok, I managed to achieve what I wanted. I created a new phing task and made the replacement in there.
You can see how it works on the base of this joomla plugin:
https://github.com/compojoom/CUpdater
The build.xml file is here:
https://github.com/compojoom/CUpdater/blob/master/builds/plugin.xml
and the task is here:
https://github.com/compojoom/CUpdater/blob/master/builds/phingext/listjpackagefilestask.php
Do you know if there is a way in Magento to override classes from Zend framework using configuration like in next example:
<config>
<global>
<models>
<mymodule>
<class>MyNamespace_MyModule_Model</class>
</mymodule>
<zend>
<rewrite>
<somezendclass>MyNamespace_MyModule_Model_SomeZendClass</somezendclass>
</rewrite>
</zend>
</models>
</global>
</config>
I don't think it is possible.
If you really want to change some class from ZF, you should copy it to app/code/local/Zend (path to your class...) directory.
Bad thing is that you should copy and paste whole class.